Fulltext Search Function - Mailing list pgsql-general

From Jeremaine Johnson
Subject Fulltext Search Function
Date
Msg-id 38950AAC6DD74747BD96C13DCC6F486201257AF4B076@VOCAL-SBS.vocal.local
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: "Marc Mamin"
Date:
Subject: foreign keys with constant part
Next
From: Emanuel Calvo
Date:
Subject: Key not present in table, but it is.