Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like Search using full text index

Status
Not open for further replies.

spperl

Programmer
Mar 29, 2005
34
GB
Hi,

Does anyone know if it is it possible to do a like search using to_tsquery?


e.g.
to_tsquery('english','search_term*') AS query

or
to_tsquery('english','car*') AS query


this would match car, card, care, cardio etc.. etc..

The tests I have done so far appear to suggest this isn't possible however my knowledge is weak in this area so I would be grateful for any pointers.

Thanks,


 
Hi,

More specific question. The following query does not appear to work on v8.3.14:

select * from table, to_tsquery('english','car:*') as query WHERE to_tsvector('english', title) @@ query

ERROR: syntax error in tsquery: "car:*"

Does anyone know if this functionality was brought in on a later version of postgres?



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top