Tsearch2 headline usage

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Tsearch2 headline usage
Date: 2005-06-04 11:26:56
Message-ID: a97c77030506040426333d780e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Browse pgsql-sql by date

  From Date Subject
Next Message Federico Pedemonte 2005-06-04 16:19:35 Re: Multiple SRF parameters from query
Previous Message PFC 2005-06-03 18:42:34 Re: getting details about integrity constraint violation