My Model:
class Package < ActiveRecord::Base
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
end
When I ask if the index exists, I get true
:
Package.__elasticsearch__.client.indices.exists(index: "packages")
=> true
But when I do:
Package.__elasticsearch__.client.indices.get(index: "packages")
I get this error:
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] No handler found for uri [/packages] and method [GET]
I already have some documents indexed, and I can do a search, so what's wrong with the line above?
ps: here's the doc: http://www.rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Indices/Actions