Re: Fragments in tsearch2 headline - Mailing list pgsql-general

From Tom Lane
Subject Re: Fragments in tsearch2 headline
Date
Msg-id 20717.1193542745@sss.pgh.pa.us
Whole thread Raw
In response to Fragments in tsearch2 headline  ("Catalin Marinas" <catalin.marinas@gmail.com>)
Responses Re: Fragments in tsearch2 headline  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-general
"Catalin Marinas" <catalin.marinas@gmail.com> writes:
> Is there an easy way to generate a headline from separate fragments
> containing the search words and maybe separated by "..."?

Hmm, the documentation for ts_headline claims it does this already:

    <function>ts_headline</function> accepts a document along
    with a query, and returns one or more ellipsis-separated excerpts from
    the document in which terms from the query are highlighted.

However, a quick look at the code suggests this is a lie --- I see no
evidence whatever that there's any smarts for putting in ellipses.

Oleg, Teodor, is there something I missed here?  Or do we need to change
the documentation?

            regards, tom lane

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: How can I easily and effectively support (language) translation of column values?
Next
From: Oleg Bartunov
Date:
Subject: Re: Fragments in tsearch2 headline