Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly
Date
Msg-id ZT2bzCEZ1UgpAe7a@momjian.us
Whole thread Raw
In response to Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly  (Pavel Borisov <pashkin.elfe@gmail.com>)
List pgsql-bugs
On Sun, Oct 29, 2023 at 01:20:11AM +0400, Pavel Borisov wrote:
> Hi, Bruce and Tom!
> I think that the ts_headline main functionality is to make Postgres
> more friendly to search-engine-like approach, which I feel is too
> niche usage scenario for supporting it as a part of core code. If
> remember right, bug reports coming from the users supposing it has
> more strict semantics than it has in reality are regular. And I also
> remember myself being puzzled by unusual output in the past.
> 
> If we fiddle with other parameters of ts_headline we can easily have
> other kinds of output that seem counterintuitive e.g.:
> SELECT ts_headline('English',

I just posted a proposed doc patch which should help reduce the number
of people surprised by the highlighting.  Let's see if that helps.

FYI, here is a Stack Overflow post from 2021 linking to the original
email that started this thread from 2018:


https://stackoverflow.com/questions/69512416/is-ts-headline-intended-to-highlight-non-matching-parts-of-the-query-which-it

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly
Next
From: Tom Lane
Date:
Subject: Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly