Ruby on Rails: Building a Reverse Index for Search
Wow. I’ve never been so impressed with a framework. Take a look at this guide to create a reverse index for search in Ruby on Rails. Here’s the basic idea:
- Install a gem
- Install a plugin
- Specify the fields for each model that should be indexed
- Call the find_by_contents method
Insane! I used Lucene with Timedex, and I can’t even begin to explain how much more work that was.
So rad!
2 Comments so far
Leave a reply

Ferret is awesome on Rails, but creating queries that relate between relationships can be tricky the first time you try, and when deploying I’d recommend including the ferret server commands in some script because it’s all too easy to forget it exists.
Thanks for the heads up, Clint!