Saturday, August 14, 2010

Wildcard on Postgresql Full Text Search

Note these two characters: :*

select x.y, to_tsvector('english',x.y) @@ to_tsquery('english','quic:*') as match
from (values
('The quick brown fox jumps over the lazy dog')) as x(y)

Output:
y                                            | match
---------------------------------------------+-------
 The quick brown fox jumps over the lazy dog | t
(1 row)

2 comments: