On Sat, Jul 27, 2013 at 10:04 AM, Janek Sendrowski <janek12@xxxxxx> wrote: > If I'm searching for a sentence like "The tiger is the largest cat species" for example. > I can only find the sentences, which include the words "tiger, largest, cat, species", but I also like to have the sentences with only three or even two of these words. You can use & (AND), | (OR), and ! (NOT) operators in tsquery, so you can achieve what you want just like this: [local]:5432 grayhemp@grayhemp=# select to_tsquery('tiger | largest | cat | species') @@ to_tsvector('The tiger is the largest cat'); ?column? ---------- t Or may be I understand something wrong again? > > Janek > > > -- > Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA Profile: http://www.linkedin.com/in/grayhemp Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979 Skype: gray-hemp Jabber: gray.ru@xxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general