| From: | Jeremaine Johnson <JJohnson(at)vocal(dot)co(dot)uk> |
|---|---|
| To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Fulltext Search Function |
| Date: | 2012-07-11 11:20:36 |
| Message-ID: | 38950AAC6DD74747BD96C13DCC6F486201257AF4B076@VOCAL-SBS.vocal.local |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
I have a full text search query (below) which works fine but would like to write a function which will make use of this query passing in two parameters, any ideas please?
SELECT name, description, ts_rank_cd(textsearchable_index_col, query, 32 /* rank/(rank+1) */) AS rank
FROM companies , to_tsquery('client | (uk & vocal)') query
WHERE query @@ textsearchable_index_col
ORDER BY rank DESC
LIMIT 10;
I look forward to hearing from you.
Regards,
Jeremaine Johnson
DBA / Developer
| From | Date | Subject | |
|---|---|---|---|
| Next Message | martin soethof | 2012-07-11 12:58:44 | question about installation |
| Previous Message | Marc Mamin | 2012-07-11 10:41:26 | foreign keys with constant part |