I want to create a search engine, in Rails, for my website, with an overview (some words around the searched word) and the word highlighted. Something like google or github.
Is it a gem for this? What’s is the best way to do that?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are varios search engines like sphinx or solr that also have gems to connect rails to it eg. which are gems on its own. There are railscasts for both of them.
When you want to highlight the results you can use a combination of the
excerptandhighlightmethods provided by Rails:http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html