From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Phrase search distance syntax |
Date: | 2016-09-23 14:09:34 |
Message-ID: | 20160923140934.GC13853@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 23, 2016 at 05:07:26PM +0300, Teodor Sigaev wrote:
> >Sorry to be asking another phrase search syntax question, and so close
> >to final release, but ...
> Really close...
> >
> >Why does the phrase distance operator assume <1> means adjacent words,
> >and not <0>. (FYI, <-> is the same as <1>.)
> Because
> 1 it is a result of subtruction of word's positions
> 2 <0> could be used as special case like a word with two infinitives:
> # create text search dictionary xx (template = 'ispell',
> DictFile='ispell_sample', AffFile='ispell_sample');
> # alter text search configuration english ALTER MAPPING FOR asciiword WITH
> xx, english_stem;
>
> # select to_tsvector('english', 'bookings');
> to_tsvector
> ----------------------
> 'book':1 'booking':1
>
> # select to_tsvector('english', 'bookings') @@ 'book <0> booking';
> ?column?
> ----------
> t
> (1 row)
OK, thanks. I just found it as unusual.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-09-23 14:11:42 | Re: Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied” |
Previous Message | Teodor Sigaev | 2016-09-23 14:07:26 | Re: Phrase search distance syntax |