From: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Tsearch2 headline usage
Date: Sat, 4 Jun 2005 16:56:56 +0530
Message-ID: <a97c77030506040426333d780e@mail.gmail.com> (raw)
Hi There,
We are using tsearch2 for FTS implementation. For highlighting the search
term
in the result we are displaying the output of headline function which is
supposed to tag (mark up) those stemmed words in the text that match any of
the
stemmed words in search term. The problem is that some initial part of the
text
is being truncated from the headline output. Can anyone please suggest on
how
to overcome this phenomenon.
tradein_clients=> SELECT headline( 'A Leading manufacturer & Exporter of TAJ
Brand Ice cream Plant & Dairy Equipments with complete plants in various
capacities. Pasteuriser, Homogenizer, Surface Cooler, Plate Chiller, Ageing
Vat, Ice Cream Continuous Freezer, Single Flavour Softy, Bulk Milk Coolers.'
, to_tsquery('ice&cream&plant') , 'StartSel=<b>, StopSel=</b>' ) ;
headline
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<b>cream</b> <b>Plant</b> & Dairy Equipments with complete <b>plants</b> in
various capacities. Pasteuriser, Homogenizer, Surface Cooler, Plate Chiller,
Ageing Vat, <b>Ice</b> <b>Cream</b>
(1 row)
Regds
Mallah.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mallah.rajesh@gmail.com
Subject: Re: Tsearch2 headline usage
In-Reply-To: <a97c77030506040426333d780e@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox