Re: Fragments in tsearch2 headline

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Catalin Marinas" <catalin(dot)marinas(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: Fragments in tsearch2 headline
Date: 2007-10-28 03:39:05
Message-ID: 20717.1193542745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Catalin Marinas" <catalin(dot)marinas(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2007-10-28 04:14:28 Re: Fragments in tsearch2 headline
Previous Message Karsten Hilbert 2007-10-28 00:37:55 Re: How can I easily and effectively support (language) translation of column values?