Re: Fragments in tsearch2 headline

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

Oleg Bartunov wrote:
> Catalin,
>
> what is your need ? What's wrong with this ?
>
> postgres=# select ts_headline('1 2 3 4 5 3 4 abc abc 2 3
> xyz','2'::tsquery, 'StartSel=...,StopSel=...')
> ;
> ts_headline
> -------------------------------------------
> 1 ...2... 3 4 5 3 4 abc abc ...2... 3 xyz

I think he want's something like: "1 2 3 ... abc 2 3 ..."

A few characters of context around each match and then ... between. Kind
of like grep -C.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Filip Rembiałkowski 2007-10-30 12:02:25 Re: print command in sproc
Previous Message Oleg Bartunov 2007-10-30 10:52:07 Re: Fragments in tsearch2 headline