Skip to content

Instantly share code, notes, and snippets.

@ollym
Created January 29, 2010 21:51
Show Gist options
  • Save ollym/290182 to your computer and use it in GitHub Desktop.
Save ollym/290182 to your computer and use it in GitHub Desktop.
DB::select(array('*', 'rank' => DB::expr('ts_rank_cd(fulltext_tsvector, to_tsquery(\'kohana or something\')))')))
->from('page')
->where(DB::expr('to_tsquery(\'kohana or something\')::tsquery'), '@@', DB::expr('fulltext_tsvector::tsvector'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment