|
QuickStart
Quick Start
IntroductionAfter you've set-up your database follow these quick steps to get up and running. Get the pluginruby script/plugin install git://github.com/pka/acts_as_tsearch.git Add acts_as_tsearch to a modelclass BlogEntry < ActiveRecord::Base acts_as_tsearch :fields => ["title","description"] end Do a searchblog_entries = BlogEntry.find_by_tsearch("bob")
puts blog_entries.tsearch_rank
puts blog_entries.size
puts blog_entries[0].title
...etc...Note extra columnSearches are default sorted by the added column tsearch_rank. Sample ProjectA sample project to help you get started, especially if you're using PostgreSQL 8.2 or older. Just grab the whole project with a mkdir tsearch cd tsearch svn export --force http://acts-as-tsearch.googlecode.com/svn/trunk/ . and read the README. |
Sign in to add a comment