Re: [GENERAL] Fragments in tsearch2 headline - Mailing list pgsql-hackers

From Sushant Sinha
Subject Re: [GENERAL] Fragments in tsearch2 headline
Date
Msg-id 9fb559330807230917h19b61057p3d5fb59601fd9522@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Fragments in tsearch2 headline  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: [GENERAL] Fragments in tsearch2 headline
List pgsql-hackers
I guess it is more readable to add cover separator at the end of a fragment than in the front. Let me know what you think and I can update it.

I think the right place for cover separator is in the structure HeadlineParsedText just like startsel and stopsel. This will enable users to specify their own cover separators. But this will require changes to the structure as well as to the generateHeadline function. This option will not also play well with the default headline generation function.

The default MaxWords = 35 seems a bit high for this headline generation function and 20 seems to be more reasonable. Any thoughts?

-Sushant.


On Wed, Jul 23, 2008 at 7:44 AM, Oleg Bartunov <oleg@sai.msu.su> wrote:
btw, is it intentional to have '....' in headline ?

=# select ts_headline('1 2 3 4 5 1 2 3 1','1&4'::tsquery,'MaxFragments=1');
      ts_headline
-------------------------
 ... <b>4</b> 5 <b>1</b>



Oleg


On Wed, 23 Jul 2008, Teodor Sigaev wrote:

Let me know of any other changes that are needed.

Looks like ready to commit, but documentation is needed.



       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-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] GIN improvements
Next
From: Tom Lane
Date:
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?