Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
Дата
Msg-id CAPpHfdtbgJJzyXiGG8F2ZW3c3jUH2fZ0UMqH+PbdcrW6-8JpDg@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-bugs
Hi!

On Tue, Aug 25, 2020 at 11:24 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
> In the regression tests src/test/regress/expected/tsearch.out there's an
> example relating to double-quoted searches:
>
> select websearch_to_tsquery('english', '"pg_class pg"');
>     websearch_to_tsquery
> -----------------------------
>  ( 'pg' & 'class' ) <-> 'pg'
> (1 row)
>
> However, if you ran a query like that against that exact text 'pg_class pg',
> the result is false when I'd expect it should be true
>
>    select to_tsvector('pg_class pg') @@ websearch_to_tsquery('"pg_class
> pg"');
>
> I'd think websearch_to_tsquery('english', '"pg_class pg"') should ideally
> return
>
>     'pg' <-> 'class'  <-> 'pg'
>
> which does match the original string, e.g:
>
>       select to_tsvector('pg_class pg') @@ to_tsquery('pg <-> class <->
> pg');
>
> does return true

It really looks at least counterintuitive for me.  I'm going to check this out.

------
Regards,
Alexander Korotkov



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUG] plpgsql RETURN QUERY with toasted fields -vs- DROP/TRUNCATE
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches