Re: Phrase search distance syntax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Phrase search distance syntax
Date: 2016-09-23 14:23:16
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
>> 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:

This is actually documented, in 12.1.2:

A special case that's sometimes useful is that <0> can be used to
require that two patterns match the same word.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-23 14:38:57 Re: [PATCH] Remove redundant if clause in standbydesc.c
Previous 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”