Postgresql full text search part of words

Posted by Grezly on Stack Overflow See other posts from Stack Overflow or by Grezly
Published on 2010-12-27T16:01:03Z Indexed on 2010/12/27 22:54 UTC
Read the original article Hit count: 158

Filed under:
|

Is postresql capable of doing a full text search, based on 'half' a word? For example i'm trying to seach foor tree, but i tell postgres to search for 'tr'. I can't find such a solution that is capable of doing this.

Currently i'm using this

 select * from test, to_tsquery('tree') as q where vectors @@ q ;

But i like to do something like this:

 select * from test, to_tsquery('tr%') as q where vectors @@ q ;

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about full