Closed vfa-dunghn closed 5 years ago
Can you model your question with an executable example like this one: https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-model/examples/mongoid_article.rb so I can just run it and see?
Hi @vfa-dunghn ,
Have you created an index for your model Club. If not, this can be a reason for your error. Before searching, you must index your documents by running the following command for each document in your Club model.
Club.each { |club| club.__elasticsearch__.index_document! }
Or you can index all documents of your model by executing these two commands:
Club.__elasticsearch__.create_index!
Club.import
After indexing your documents you can search them by executing:
Club.search('aero')
Hi @vfa-dunghn can I close this?
Closing issue as there hasn't been activity on it since 2016.
Hi friends. I have a model
[404] {"error":"IndexMissingException[[Index_Key] missing]","status":404}