Skip to content
This repository has been archived by the owner on May 18, 2018. It is now read-only.
/ acts_as_tsearch Public archive
forked from pka/acts_as_tsearch

Ruby on Rails plugin for the Full Text Search engine of PostgreSQL

License

Notifications You must be signed in to change notification settings

prevailhs/acts_as_tsearch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActsAsTsearch

Fork of acts_as_tsearch code.google.com/p/acts-as-tsearch/ with a few changes:

  • Return scope instead of collections, so that a search can be combined with existing scopes, will_paginate and most of all, enable lazy loading

  • Check for table existence, to prevent problems with rake db:create/db:drop et. al

Requirements

  • Postgres version >= 8.3

  • Rails version >= 2.0

Quick Start

  • Preparing your PostgreSQL database

Add a text search configuration ‘default’:

CREATE TEXT SEARCH CONFIGURATION public.default ( COPY = pg_catalog.english )

Do a search

blog_entries = BlogEntry.find_by_tsearch("bob")
puts blog_entries.tsearch_rank
puts blog_entries.size
puts blog_entries[0].title
...etc...

About

Ruby on Rails plugin for the Full Text Search engine of PostgreSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%