IndexMissingException[[articles] missing]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

IndexMissingException[[articles] missing]

bhargava.r
This post has NOT been accepted by the mailing list yet.
It is probably a newbie question but I am struggling to get rid of it.

My Article model is:

class Article < ActiveRecord::Base
  include Elasticsearch::Model
  include Elasticsearch::Model::Callbacks
end

And this is how we search using elastic search(below). Right?

@articles = Article.search(params[:q]).records

When I search with certain parameters, I could see that @articles is of below written object type.

#<Elasticsearch::Model::Response::Records:0xa227324>

Now, when I iterate over the @articles, I can not. I get:

[404] {"error":"IndexMissingException[[articles] missing]","status":404}
Any thoughts would be appreciable.

I would be happy to share more details if anybody want to know. Thanks in advance.