Phrase search distance syntax

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Phrase search distance syntax
Date: 2016-09-23 13:20:29
Message-ID: 20160923132029.GA26867@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry to be asking another phrase search syntax question, and so close
to final release, but ...

Why does the phrase distance operator assume <1> means adjacent words,
and not <0>. (FYI, <-> is the same as <1>.)

For example:

select to_tsvector('park a a house') @@ to_tsquery('park <3> house');

seems like it would be more logical as <2>, meaning two lexems between
the words.

--
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 +

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-23 13:29:39 Re: asynchronous and vectorized execution
Previous Message Amit Kapila 2016-09-23 13:20:26 Re: Speed up Clog Access by increasing CLOG buffers