From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: bp@barryp.org
Subject: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
Date: Tue, 25 Aug 2020 20:07:28 +0000
Message-ID: <16592-70b110ff9731c07d@postgresql.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, bp@barryp.org
Subject: Re: BUG #16592: websearch_to_tsquery() returns queries that don't result in expected matches
In-Reply-To: <16592-70b110ff9731c07d@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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