searchkick

How do I setup SearchKick/ElasticSearch on the NEW Nitrous.io IDE?

我的梦境 提交于 2019-12-04 13:21:54
问题 I am following the McKenzie Childs tutorial on making a "Movie Review" app on Ruby on Rails and he is using the searchkick gem. I am doing everything through the new Nitrous platform and everything is confusing. I was running this command to: rake searchkick:reindex CLASS=Movie and got the following error in the shell: rake aborted! Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost"port 9200 /home/nitrous/code/12_in_12/movie_review/.bundle/gems/faraday-0.9.1/lib

Searchkick not searching multiple terms when specify fields

泪湿孤枕 提交于 2019-12-03 15:36:19
Can anyone provide advice on the following please? I'm using searchkick / elasticsearch and would like to search for a key term or terms across multiple fields (name, manufacturer). So for example if im looking for a product called "myproduct" made my "somemanufacturer" i'd expect to see this result appear if I search either "myproduct", "somemanufacturer" or "myproduct somemanufacturer" as both these terms are included either in name or manufacturer fields. My problem is the following: @products = Product.search query Allows all the search terms listed above and returns expected result

How do I setup SearchKick/ElasticSearch on the NEW Nitrous.io IDE?

ぃ、小莉子 提交于 2019-12-03 08:26:54
I am following the McKenzie Childs tutorial on making a "Movie Review" app on Ruby on Rails and he is using the searchkick gem. I am doing everything through the new Nitrous platform and everything is confusing. I was running this command to: rake searchkick:reindex CLASS=Movie and got the following error in the shell: rake aborted! Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost"port 9200 /home/nitrous/code/12_in_12/movie_review/.bundle/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:80:in `perform_request' /home/nitrous/code/12_in_12/movie_review/.bundle/gems

Searchkick with ElasticSearch returns “Faraday::ConnectionFailed: execution expired”

旧街凉风 提交于 2019-12-02 13:10:15
问题 I've been using the searchkick gem with elasticsearch with no problems on a Rails 4.2.0 application. I have a single Video model using searchkick. For some reason rake searchkick:reindex:all is now failing consistently with: Reindexing Video... rake aborted! Faraday::ConnectionFailed: execution expired I originally installed elasticsearch via brew install elasticsearch , which returns: Warning: elasticsearch-1.3.4 already installed Is it likely that my elasticsearch installation/database has

Searchkick with ElasticSearch returns “Faraday::ConnectionFailed: execution expired”

我的未来我决定 提交于 2019-12-02 07:24:53
I've been using the searchkick gem with elasticsearch with no problems on a Rails 4.2.0 application. I have a single Video model using searchkick. For some reason rake searchkick:reindex:all is now failing consistently with: Reindexing Video... rake aborted! Faraday::ConnectionFailed: execution expired I originally installed elasticsearch via brew install elasticsearch , which returns: Warning: elasticsearch-1.3.4 already installed Is it likely that my elasticsearch installation/database has become corrupted? If so, what is the best way to refresh it? As per https://www.elastic.co/guide/en

searchkick - Autocomplete with multiple attributes

旧街凉风 提交于 2019-11-29 16:28:20
Autocomplete works ok when searching with a single attribute as given here . Autocomplete with multiple attributes such as (name,city,country) is possible through->(according to this ) def autocomplete Doctor.search(params[:query], autocomplete: true, limit: 10).map{|doctor| doctor.slice(:name, :city, :country) } end However this results in the autocomplete dropdown/suggestions to show "undefined". For type ahead i am using: <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.9.3/typeahead.min.js"></script> In the code it is referenced by: $( function () { $("

searchkick - Autocomplete with multiple attributes

萝らか妹 提交于 2019-11-28 10:48:40
问题 Autocomplete works ok when searching with a single attribute as given here. Autocomplete with multiple attributes such as (name,city,country) is possible through->(according to this) def autocomplete Doctor.search(params[:query], autocomplete: true, limit: 10).map{|doctor| doctor.slice(:name, :city, :country) } end However this results in the autocomplete dropdown/suggestions to show "undefined". For type ahead i am using: <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs