Re: tsearch2 headline options - Mailing list pgsql-general

From Jan Sunavec
Subject Re: tsearch2 headline options
Date
Msg-id op.t4e48xtwc8yns6@akela-pc.chello.sk
Whole thread Raw
In response to Re: tsearch2 headline options  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-general
Thanks a lot. It helps.

On Fri, 04 Jan 2008 16:54:32 +0100, Oleg Bartunov <oleg@sai.msu.su> wrote:

> On Wed, 2 Jan 2008, Jan Sunavec wrote:
>
>> Hi all
>>
>> I have following problem when I use this
>>
>> select headline('asd asd asd asd asd asd asd asd asd asd asd asd more
>> more more more more more more', to_tsquery('asd'), '');
>>
>> I got this
>>
>> "<b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b>
>> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> more
>> more more"
>>
>> So result is shorted than original text. I tryed set MinWords and
>> MaxWords. But it doesn't help me. So question is how can I get original
>> text?
>
> try 'HighlightAll=TRUE
>
> arxiv=# select headline('asd asd asd asd asd asd asd asd asd asd asd asd
> more more more more more more more', to_tsquery('asd'),
> 'HighlightAll=TRUE');
>                                                                                  headline
>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>   <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b>
> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> more
> more more more more more more
>
>
>>
>> Best regards
>>
>>  John
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 2: Don't 'kill -9' the postmaster
>
>      Regards,
>          Oleg
> _____________________________________________________________
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83



pgsql-general by date:

Previous
From: rihad
Date:
Subject: Re: need to dump/restore data for 8.3beta2 -> 8.3RC1 upgrade?
Next
From: Lew
Date:
Subject: Re: Need efficient way to do comparison with NULL as an option