Module: Elastic::AppSearch::Client::Schema

Included in:
Elastic::AppSearch::Client
Defined in:
lib/elastic/app-search/client/schema.rb

Instance Method Summary collapse

Instance Method Details

#get_schema(engine_name) ⇒ Object

Retrieve schema for the current engine.



8
9
10
# File 'lib/elastic/app-search/client/schema.rb', line 8

def get_schema(engine_name)
  get("engines/#{engine_name}/schema")
end

#update_schema(engine_name, schema) ⇒ Object

Create a new schema field or update existing schema for the current engine.



13
14
15
# File 'lib/elastic/app-search/client/schema.rb', line 13

def update_schema(engine_name, schema)
  post("engines/#{engine_name}/schema", schema)
end