From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Janek Sendrowski <janek12(at)web(dot)de>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Fastest Index/Algorithm to find similar sentences |
Date: | 2013-08-11 16:54:56 |
Message-ID: | CAL_0b1stpg-iB28=m2hZM=h1JR9Ji8=-UdVE_NGFEj9RMC=VXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Aug 11, 2013 at 6:20 AM, Janek Sendrowski <janek12(at)web(dot)de> wrote:
> the ranking functions are nice, but if I search for one more word, which is not included in the sentence I'm searchingfor , It doesn't find the sentence.
I have already wrote you earlier about it. You can solve the problem
by using & (AND), | (OR), and ! (NOT) operators in tsquery.
select to_tsquery('tiger | largest | cat | species') @@
to_tsvector('The tiger is the largest cat');
?column?
----------
t
The query contains one word more than the sentence (the word is
"species"), and it successfully finds it.
--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA
http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray(dot)ru(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2013-08-11 16:55:55 | Re: earthdistance |
Previous Message | ascot.moss@gmail.com | 2013-08-11 16:41:23 | Re: replication server: LOG: invalid magic number 0000 in log file 169, segment 77, offset 4325376 |