From: | <christian(at)games(dot)no> |
---|---|
To: | <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Bug Report | Using ts_headline with the <-> operator |
Date: | 2021-01-20 12:37:46 |
Message-ID: | 011a01d6ef29$0e8e1b20$2baa5160$@games.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PostgreSQL version: 10.15
Operating system: Linux/Ubuntu
Bug when using ts_headline with the <-> operator
Assuming the following query:
SELECT ts_headline('simple','The Cyberpunk launch did not go as expected for
Cyberpunk Fans around the world', phraseto_tsquery('simple','Cyberpunk
Fans')::tsquery);
The returned result is:
The <b>Cyberpunk</b> launch did not go as expected for <b>Cyberpunk</b>
<b>Fans</b> around the world
This highlights the Cyberpunk alone in addition to Cyberpunk Fans.
However, the expected output would be:
The Cyberpunk launch did not go as expected for <b>Cyberpunk</b> <b>Fans</b>
around the world
Which only highlights *Cyberpunk Fans* due to the <-> operator in
phraseto_tsquery.
SELECT phraseto_tsquery('simple','Cyberpunk Fans');
The above returns 'cyberpunk<-> 'fans' as expected, so presumably this is an
issue with the ts_headline function.
I would be great to see this fixed/improved in the near future.
Christian
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-01-20 15:25:10 | Re: Reproducible GIST index corruption under concurrent updates |
Previous Message | Heikki Linnakangas | 2021-01-20 10:04:23 | Re: Reproducible GIST index corruption under concurrent updates |