I’m working on a new application in Rails that uses both Tagging as well as full text indexing. I decided to go with Ferret, which is just a Ruby port of Lucene. Using the acts_as_ferret plugin, it’s dead simple to integrate into your application. First, you want to install Ferret on your machine, and then run this command:
At this point, you are ready to start enabling searching on your objects. Let’s say you want to enable full text search through a list of blog posts in your application. All you need is to add the acts_as_ferret line to your model class.
And there you have it, full text indexing is enabled. To search through your objects, you’ll do nothing more than this:


Loading...