Prevents indexing Alternatives • Use Trigram + GIN index • Using an SQL incantation to wrap or replace the function and make it immutable http://stackoverflow.com/questions/11005036/does-postgresql-support-accent-insensitive-collations/11007216#11007216
g pg_search:migration:multisearch • Add multisearchable to your model class Course < ActiveRecord::Base multisearchable against: [:title, :summary, :description, :topics_str, :level]
a ActiveRecord::Relation of PgSearch::Document => Can call .searchable on each PgSearch::Document to get the original resource. • Configuration is the same as pg_search_scope
column to store lexemes. • One tsvector column is needed for each searching method. • You’ll also need to create a trigger function to update the tsvector column when content changes in the original model object. • SQL schema format required.
and the pg_search contributors • Adam Sanderson “Postgres: The best tool you’re already using.” (Talk on Confreaks.) • Dan Croak, Thoughtbot “Optimizing Full Text Search with Postgres tsvector Columns and Triggers” (Blog Post)