itscool sid said almost 8 years ago on Searchkick and Elasticsearch :

What about on production level ? Elasticsearch consumes memory. How can I manage it on a 2gb aws ubuntu instance?   


David Kimura PRO said almost 8 years ago on Searchkick and Elasticsearch :

I'd recommend using https://aws.amazon.com/elasticsearch-service if hosting your instances in AWS. Just be mindful and lock the security of the search instance/cluster to the EC2 instance.


Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

curl http://localhost:9200

I got "unknown regexp options - lcalht", however, elasticsearch.log shows I had started elasticsearch fine.

what did I do wrong?

Thanks in advance


Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

never mind of my previous comment...forget it. Sorry!


Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

Hello,

I have cloned your code to my ubuntu 16.04 running Ruby 2.3.3 with rails 5.0.1.

Everything works except autocomplete. I got a 500 Internal Server Error.

The console in Chrome browser showed that it got a stop at line 9537 of Jquery3, It stops at the same line no mater Jquery, Jquery2, or Jquery3 

The line shows the following code as,

xhr.send( options.hasContent && options.data || null );

Any hints for me?

Thanks in advance!




Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

elasticsearch works in my server. However, I am not sure if I need to configure it for this tutorial.


David Kimura PRO said over 7 years ago on Searchkick and Elasticsearch :

Error 500 indicates that something went wrong on the server side and it should have logged something into your application logs. Check there and if you're unable to figure it out, post the relevant section of the log please.


Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

http://localhost:3000 works

As soon as I typed letter "i", autocomplete started to give me  some error messages.

After "iron" and search, then

Movie.search(search, where: { year: { gt: 2000 } })

is highlighted to indicate where it stopped. What is your Ruby version? I got 2.3.3, perhaps I should try your Ruby version. Thank you for looking into this!

def index
  search = params[:term].present? ? params[:term] : nil
  @movies = if search
    # Movie.where("title LIKE ? OR plot LIKE ?", "%#{search}%", "%#{search}%")
    Movie.search(search, where: { year: { gt: 2000 } })
  else
    Movie.all
  end
end
Searchkick::InvalidQueryError - [400] {"error": {"root_cause": [{"type": "query_shard_exception","reason": "[match] analyzer [searchkick_word_search] not found","index_uuid": "3I4KbiHfSBqIYPWZlzkFKA","index": "movies_development"}], "type": "search_phase_execution_exception","reason": "all shards failed","phase": "query","grouped": true,"failed_shards": [{"shard": 0,"index": "movies_development", "node": "OvOTxtcQQpusc1OQk8tvMQ","reason": {"type": "query_shard_exception","reason": "[match] analyzer [searchkick_word_search] not found","index_uuid": "3I4KbiHfSBqIYPWZlzkFKA","index": "movies_development"}}],"caused_by": {"type": "query_shard_exception","reason": "[match] analyzer [searchkick_word_search] not found","index_uuid": "3I4KbiHfSBqIYPWZlzkFKA","index": "movies_development"}}, "status": 400}: 


Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

Sorry, I did not know the format would mess up like this. My email is danlideng@yahoo.com. I will send you a email about the log message if you give your email address.


David Kimura PRO said over 7 years ago on Searchkick and Elasticsearch :

Have you tried reindexing your Movie model?

You can within the console run

# BASH
rails c
# RAILS CONSOLE
Movie.reindex


or straight from Bash

rake searchkick:reindex CLASS=Movie

Denny Deng said over 7 years ago on Searchkick and Elasticsearch :

I cannot believe I missed reindexing. Thanks a lot! Everything is working now.


David Kimura PRO said over 7 years ago on Searchkick and Elasticsearch :

Sweet! Glad that worked!


Thato Sello said over 7 years ago on Searchkick and Elasticsearch :

This is a great tut and it's much appreciated. 
I would love to know how I could customize the typeahead to include users profile pictures alongside the name to the queried results.


David Kimura PRO said over 7 years ago on Searchkick and Elasticsearch :

I think that would be a fun episode to cover and definitely enough content to be its own episode.


Thato Sello said over 7 years ago on Searchkick and Elasticsearch :

That would be extremely informative and thank you for the response kobaltz. 


lupeng liu said over 7 years ago on Searchkick and Elasticsearch :

hi, the video is very excellent. But I am a new guy to ruby on rails. I clone the project from github to local. I run `rake db:create` `rake db:migrate` , it seems work well.

but when i run `rake db:seed`, errors comes.  please see the log below, can you help me to solve this problem?



lupeng liu said over 7 years ago on Searchkick and Elasticsearch :

And, when I visit localhost:3000/movies/new,  errors come out.  please see below, can you give some suggestion?



David Kimura PRO said over 7 years ago on Searchkick and Elasticsearch :

The RestClient appears to be returning an Unauthorized response and your seeds file isn’t taking that into consideration. Hope that helps.


Login to Comment