Example code to get you up and started with the built-in FTS (Full Text Search) feature of PostgreSQL >= 8.3
-
At the command prompt, create the database rake db:create
-
Run the migrations: rake db:migrate
-
Populate with seed data: rake db:data:load -> Load contents of db/data.yml into the database
-
Grab those gems bundle install
-
Start the dev server rails s
Try entering the following in to the search textbox (without quotes):
- 'hot' - Demonstrates ranking through word proximity, weighting & number of occurrences
- 'monkeys' - As above
- 'hot monkeys' - Demonstrates understanding of english pluralization, weighting
PostgreSQL Full Text Search docs are here: http://www.postgresql.org/docs/9.0/static/textsearch.html