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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly
Дата
Msg-id 2425864.1698682991@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
Bruce Momjian <bruce@momjian.us> writes:
> Sold!  :-)  Attached.

LGTM.

BTW, just for the OP's context: ts_headline was designed before
we had phrase search operators.  With only AND/OR/NOT, there
aren't any location restrictions on individual words.  (I recall
that we occasionally got complaints about how it shouldn't
highlight words that are supposed to NOT be there, but that was
an uncommon situation because normally you wouldn't be selecting
such a document to highlight.)  So both the function's basic
algorithm and its control parameters were designed without thought
for what to do if the query restricted match locations.  Maybe there's
a case for rethinking what it should do more than we already have;
but it's not clear that you can do much better without throwing out
the current set of control parameters as well as the algorithm.
See [1] for some context and discussion.

            regards, tom lane

[1] https://www.postgresql.org/message-id/flat/840.1669405935%40sss.pgh.pa.us



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #15172: Postgresql ts_headline with <-> operator does not highlight text properly
Следующее
От: Andrei Lepikhov
Дата:
Сообщение: Re: BUG #18170: Unexpected error: no relation entry for relid 3