OK, in this article, I am going to discuss how to do search in Rails. Searching can be split into three levels namely
Light: When you just need to search a column in a table who’s length isn’t great or does not have much content. To do that kind of search, you can refer this good video on Railscasts http://railscasts.com/episodes/37-simple-search-form
Moderate: In this category we need to search probably more than one column in a table(s), who’s size is quiet great, like say upto a few tens of megabytes of text data. You can use a plugin called ransack https://github.com/ernie/ransack which would accomplish this job.
Heavy: Lets say that our database size is going in gigabytes(s), then you must need a kinda professional search. So there is one, thankfully! And its a free software too. You could use Thinking Sphinx http://freelancing-god.github.com/ts/en/ which will scale up almost unlimited amount!
Well if you have implemented any one of the above methods, do tell me how it is.