Re: query1 followed by query2 at maximum distance vs current fixed distance

From: Wh isere <whisere(at)gmail(dot)com>
To: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: query1 followed by query2 at maximum distance vs current fixed distance
Date: 2019-07-30 10:22:50
Message-ID: CAK3r-hNOs0OG4QMap3rVoOV=qK2NkEWnYJ7hcA2VicinDMn0JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Arthur! I guess there is not other solution? I tried to create a
function to loop through all the distance but its very slow.

On Tuesday, July 30, 2019, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> wrote:

> Hello,
>
> On 23.07.2019 09:55, Wh isere wrote:
>
>> Is this possible with the current websearch_to_tsquery function?
>>
>> Thanks.
>>
>> Hello everyone, I am wondering if
>> AROUND(N) or <N, M> is still possible? I found this thread below and
>> the original post
>> https://www.postgresql.org/message-id/fe931111ff7e9ad7919648
>> 6ada79e268%40postgrespro.ru
>> mentioned the proposed feature: 'New operator AROUND(N). It matches
>> if the distance between words(or maybe phrases) is less than or
>> equal to N.'
>>
>> currently in tsquery_phrase(query1 tsquery, query2 tsquery, distance
>> integer) the distaince is searching a fixed distance, is there way to
>> search maximum distance so the search returns query1 followed by
>> query2 up
>> to a certain distance? like the AROUND(N) or <N, M> mentioned in the
>> thread?
>>
> As far as I know AROUND(N) and <N, M> weren't committed, unfortunately.
> And so you can search only using a fixed distance currently.
>
> websearch_to_tsquery() can't help here. It just transforms search pattern
> with OR, AND statements into tsquery syntax.
>
> --
> Arthur Zakirov
> Postgres Professional: http://www.postgrespro.com
> Russian Postgres Company
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ning Yu 2019-07-30 10:22:59 Re: Possible race condition in pg_mkdir_p()?
Previous Message Konstantin Knizhnik 2019-07-30 10:01:48 Re: Built-in connection pooler