sql - postgresql-8.4 text search is not working -
i tried implement full/partial text search using postgresql-8.4 & django
select * fts body_tsvector @@ plainto_tsquery('english','hello welcome')
available records are
'hello world' 'hello old world' 'hi welcome'
but result of query not expected,which displays 0 records,.how partial/full text search possible using plainto_tsquery?thanks in advance.
it looks expecting plainto_tsquery
perform |
(or) query. the docs state:
plainto_tsquery transforms unformatted text querytext tsquery. text parsed , normalized to_tsvector, & (and) boolean operator inserted between surviving words.
so want must parse text yourself, create ts_query |
operator.
select * fts body_tsvector @@ to_tsquery('english','hello | welcome');
Comments
Post a Comment