Virtually every app sooner or later needs some kind of a search, and when it comes to searching against your
database, simple SQL
LIKE is normally not enough due to a number of reasons (word stemming, speed, etc.) In this case, the obvious solution is full text search.
When it comes to selecting a full text search engine, you have a variety of options. Most popular open source engines are: Apache Solr, Spinx, Elastic Search. Heck, Postgres has it’s own full text search implementation (Ryan Bates has an excellent railscast on it, I will touch on it in later posts). As a Rails developer, I often look for solutions that will easily integrate into Rails app, i.e. I look for Ruby gems. And, when it comes to full text search, you are fortunate. There are plenty of options. sunspot_rails is powered by Apache Solr, thinking_sphinx by Sphinx, and tire by Elastic Search. Moreover, there is at least one Heroku addon for each one of these.