My favorites | Sign in
Project Home Wiki Issues Source
Project Information
Members
Links

Acts_as_tsearch is a plugin for Ruby on Rails which makes it simple to implement scalable, full text search for Rails if you're using PostgreSQL as your database. It wraps the built-in full text search engine of PostgreSQL with a familiar 'acts_as' implementation.

The primary author Ben Wiseley of ActiveRain explains their motivation: While scalability problems with acts_as_ferret (likely through our own ignorance) led us to develop this we'd love to thank acts_as_ferret for providing an excellent model on how to do as acts_as_search plugin for Rails and getting us very quickly through our first few months. Their search solution is definitely worth looking at and is much more robust.

Where to start?

  1. Prepare your PostgreSQL database
  2. Follow the quick start
  3. Read up advanced acts_as_tsearch declarations
  4. multi-vector-searching
  5. Migrations how to migrate your search indexes
  6. Testing explains how to get unit tests working
  7. Stuck? Ask questions on acts_as_tsearch

Sample

class BlogEntry < ActiveRecord::Base
   acts_as_tsearch :fields => ['title','description']
end

BlogEntry.find_by_tsearch('who what where')
Powered by Google Project Hosting