Tutorial links on rails, you can filter by tag.
In this article I'm going to show you how to implement full-text search using Ruby on Rails and Elasticsearch.
Everyone is used nowadays to entering a search term and getting suggestions as well as results with the search term highlighted.
If you misspell what you are trying to search, having auto-correct is also a nice feature, as we can see on websites such as Google or Facebook.
require 'elasticsearch/model' class Article < ActiveRecord::Base # injects the Search method that we were using in our previous controller among others include Elasticsearch::Model # integrates with ActiveRecord callbacks to index each instance of an article that we save to the database, # and it also updates the index if we modify or delete the article from the database include Elasticsearch::Model::Callbacks end