I am trying to figure out how to add search to my rails application. I am brand new so go slow. I have created a blog and done quite a bit of customizing including adding some AJAX, pretty proud of myself so far. I am having trouble finding any good tutorials about how to add this functionality. Basically I just want to enable a full search to search my posts table. What is the easiest way to do this?
There's a great Railscast on Thinking Sphinx, which is my favorite above the other mentioned options. It's fast, simple, and is continually being developed.
There's also SearchLogic which is great if you don't really need full text indexing (you probably don't for a blog). And a Railscast to go along with that as well.
Depending on the RDBMS you are using there might be a built-in solution for fulltext search.
Otherwise you might check out Sunspot (and the Rails plugin) which uses Apache Solr for fulltext search and is easy to use. Especially writing queries/searches is much more fun than with the standard acts_as_solr plugin.
Edit Oh, and here is a screencast on Sunspot for the visual people.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With