[HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Asher Snyder
It would be very useful if there were an option to have ts_headline append ellipses before or after a result fragement based on the position of the fragment in the source document. For instance, when running ts_headline(doc, query) it will correctly return a fragment with words highlighted,

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Sushant Sinha
I think we currently do that. We add ellipses only when we encounter a new fragment. So there should not be ellipses if we are at the end of the document or if that is the first fragment (includes the beginning of the document). Here is the code in generateHeadline, ts_parse.c that adds the

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Asher Snyder
the fragments. I hope that you're correct and that it is implemented, and not documented -Original Message- From: Sushant Sinha [mailto:sushant...@gmail.com] Sent: Saturday, February 14, 2009 4:07 PM To: Asher Snyder Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Ellipses around result

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Tom Lane
Sushant Sinha sushant...@gmail.com writes: I think we currently do that. ... since about four months ago. 2008-10-17 14:05 teodor * doc/src/sgml/textsearch.sgml, src/backend/tsearch/ts_parse.c, src/backend/tsearch/wparser_def.c, src/include/tsearch/ts_public.h,

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Sushant Sinha
the fragments. I hope that you're correct and that it is implemented, and not documented -Original Message- From: Sushant Sinha [mailto:sushant...@gmail.com] Sent: Saturday, February 14, 2009 4:07 PM To: Asher Snyder Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Ellipses around

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Asher Snyder
To: Asher Snyder Cc: pgsql-hackers@postgresql.org Subject: RE: [HACKERS] Ellipses around result fragment of ts_headline The documentation in 8.4dev has information on FragmentDelimiter http://developer.postgresql.org/pgdocs/postgres/textsearch-controls.html If you do not specify MaxFragments 0

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Asher Snyder
with the first fragment. -Original Message- From: Sushant Sinha [mailto:sushant...@gmail.com] Sent: Saturday, February 14, 2009 4:47 PM To: Tom Lane Cc: Asher Snyder; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Ellipses around result fragment of ts_headline Sorry ... I thought you were

Re: [HACKERS] Ellipses around result fragment of ts_headline

2009-02-14 Thread Sushant Sinha
Sorry ... I thought you were running the development branch. -Sushant. On Sat, 2009-02-14 at 16:34 -0500, Tom Lane wrote: Sushant Sinha sushant...@gmail.com writes: I think we currently do that. ... since about four months ago. 2008-10-17 14:05 teodor *