pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
3+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2021-01-31 0c4f355c6a Fix parsing of complex morphs to tsquery
* BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
@ 2020-08-25 20:07 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2020-08-25 20:07 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: bp@barryp.org
The following bug has been logged on the website:
Bug reference: 16592
Logged by: Barry Pederson
Email address: bp@barryp.org
PostgreSQL version: 12.4
Operating system: Ubuntu 20.04
Description:
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
@ 2020-08-30 01:44 Alexander Korotkov <aekorotkov@gmail.com>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Korotkov @ 2020-08-30 01:44 UTC (permalink / raw)
To: bp@barryp.org; pgsql-bugs@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-08-30 01:44 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 20:07 BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches PG Bug reporting form <noreply@postgresql.org>
2020-08-30 01:44 ` Alexander Korotkov <aekorotkov@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox