I was following this link:
http://www.rubydoc.info/gems/elasticsearch-rails/0.1.7
to use "elastic-search" in my application but I have stuck due to silly error of ports mismatch. I get this:
Connection refused - connect(2) for "localhost" port 9200
Anyone seen this before? I am running server on my default port(3000 i.e. by using rails s).
Out of curiosity, I tried running server with port number as "9200" and this error replaced another error of TIMED_OUT. Error seen is:
Faraday::TimeoutError in Articles#search
EDITED : I am happy to resolve this. Basically, elastic search engine was not running. After resolving this problem, I seem to have hit another problem.
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.