ts_headline

From: Stephen Davies <scldad(at)sdc(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: ts_headline
Date: 2008-02-21 00:19:48
Message-ID: 200802211049.48799.scldad@sdc.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

I am a bit puzzled by the output of ts_headline (V8.3) for different queries.

I have one record in a test documentation table and am applying different
queries against that table to check out the ts_headline outputs.

The "document" in question has 2553 words which generate 519 tokens in the
ts_vector.
For most queries, ts_headline returns a string starting with one of the
criterion words and with all criterion words highlit - as I would expect.

However, some other queries return a string which seems to always start at the
beginning of the "document" and contains no highlit terms.

It seems that the difference is in the number of occurrences of the criterion
words. If the number of hits is less than some number, the ts_headline result
is "correct" but if the number of hits exceeds that limit, the result is just
the first MinWords of the "document".

I have seen cases with up to 20 hits succeed but cases with 35 hits miss.
The spread of hits does not seem to be relevant.

Is this a bug or am I missing some configuration option?

TIA,
Stephen Davies
--
========================================================================
This email is for the person(s) identified above, and is confidential to
the sender and the person(s). No one else is authorised to use or
disseminate this email or its contents.

Stephen Davies Consulting Voice: 08-8177 1595
Adelaide, South Australia. Fax: 08-8177 0133
Computing & Network solutions. Mobile:0403 0405 83

Responses

Browse pgsql-general by date

  From Date Subject
Next Message brian 2008-02-21 00:28:20 Re: Error in PlPython procedure
Previous Message mars_osrp 2008-02-20 23:53:14 Error in PlPython procedure

Browse pgsql-patches by date

  From Date Subject
Next Message Markus Bertheau 2008-02-21 02:01:39 Incomplete docs for restore_command for hot standby
Previous Message Tom Lane 2008-02-20 22:55:06 Re: BUG #3973: pg_dump using inherited tables do not always restore