Search Postgresql Archives

Re: multi-word expression full-text searching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> SELECT id FROM document WHERE to_tsvector('english',text) @@
> plainto_tsquery('english','despite this');
> --
> Teodor Sigaev

If I understand well the plainto_tsquery behaviour, this query match with:

Despite this, the president went out.
Despite the event, this question arise.

i.e., if "this" is not inside the stopwords list, the query is translated to:
SELECT id FROM document WHERE to_tsvector('english',text) @@
to_tsquery('english','despite & this');

It searches for documents which include "despite" and "this", and not for
ones which have the expression "despite this".

I have made some tests and they confirm my explanations.

Thank you anyway.

Any other solution?

Mario Barcala






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux