Search code examples
ruby-on-railsrubyelasticsearchenvironmentelasticsearch-rails

Elasticsearch-rails is searching in wrong index


I'm trying to deploy my app and index a model. Everything is working fine until i'm trying to actually get the data from elasticsearch. My environment is staging but when i perform a search via a rest api i get an error

{
  "status": "error",
  "messages": 
  "[404]{\"error\":\"IndexMissingException[[myapp_production_products] missing]\",\"status\":404}"
}

From this:

[myapp_production_products]

i deduced that it's trying to query elasticsearch on wrong environment. What is causing this?


Solution

  • Have you indexed the product? May be it will solve the issue.

    Thanks!