What's new? | Help | Directory | Sign in
Google
acts-as-tsearch
Ruby-on-Rails plugin for PostGreSQL TSearch - Full Text Search
  
  
  
  
    
Join project
Project owners:
  wiseleyb
Project members:
Barber.Craig

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 uses the included TSearch2 engine which comes with PostgreSQL but wraps is with a familiar 'acts_as' implementation for easy use.

This very simple plugin is in it's early development stages however we have it running on our production servers currently on http://activerain.com/search.

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?

All documentation is on the Wiki Tab

  1. Prepare your PostgreSQL database for TSearch
  2. Follow the quick start
  3. Read up advanced acts_as_tsearch declarations
  4. find_by_tsearch method details options for returning search results
  5. Migrations how to migrate your search indexes
  6. Testing explains how to get unit tests working
  7. See blog posts tagged as acts_as_tsearch
  8. 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')