BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: stas(at)hellofyllo(dot)com
Subject: BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators
Date: 2020-11-24 17:02:40
Message-ID: 16744-861496b4f8f941f2@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16744
Logged by: Stas Obydionnov
Email address: stas(at)hellofyllo(dot)com
PostgreSQL version: 12.3
Operating system: runs on AWS RDS
Description:

When running the following code
select ts_headline('Alpha Beta Gama', phraseto_tsquery ('alpha gama'))

or
select ts_headline('Alpha Beta Gama', to_tsquery ('alpha <-> gama'))
I would expect the result be not to be highlighted, however the result looks
like:
<b>Alpha</b> Beta <b>Gama</b>

The same behavior is found for the following operator:
select ts_headline('Alpha Beta Gama Delta', phraseto_tsquery ('alpha <3>
gama'))

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-11-24 18:18:10 Re: BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators
Previous Message Tom Lane 2020-11-24 16:42:16 Re: BUG #16739: Temporary files not deleting from data folder on disk