X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D10F352822 for ; Sat, 4 Jun 2005 08:26:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20816-01 for ; Sat, 4 Jun 2005 11:26:54 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by svr1.postgresql.org (Postfix) with ESMTP id 2692B52805 for ; Sat, 4 Jun 2005 08:26:53 -0300 (ADT) Received: by rproxy.gmail.com with SMTP id i8so1139228rne for ; Sat, 04 Jun 2005 04:26:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=hfeTIys02C4hAnUYEZlBtmfLT+gPCfGSL/MZAGM+hiyUkvKp0JB3hmcJ7swydV4hRbvZLBUjWehoS9zzUhDkVqZSjamMyT0VEUqeNtWzairlAQcSsDtCBcjKP+XeRaqYp7WkCYB1Ddj9pcKRh5fYx/eb3up7s+yzWpE0iFkt7Fc= Received: by 10.38.97.66 with SMTP id u66mr1441070rnb; Sat, 04 Jun 2005 04:26:56 -0700 (PDT) Received: by 10.38.208.52 with HTTP; Sat, 4 Jun 2005 04:26:56 -0700 (PDT) Message-ID: Date: Sat, 4 Jun 2005 16:56:56 +0530 From: Rajesh Kumar Mallah Reply-To: Rajesh Kumar Mallah To: pgsql-sql@postgresql.org Subject: Tsearch2 headline usage Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1994_26590358.1117884416957" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.081 tagged_above=0 required=5 tests=HTML_30_40, HTML_MESSAGE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200506/57 X-Sequence-Number: 21658 ------=_Part_1994_26590358.1117884416957 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi There, We are using tsearch2 for FTS implementation. For highlighting the search= =20 term in the result we are displaying the output of headline function which is=20 supposed to tag (mark up) those stemmed words in the text that match any of= =20 the stemmed words in search term. The problem is that some initial part of the= =20 text is being truncated from the headline output. Can anyone please suggest on= =20 how to overcome this phenomenon. tradein_clients=3D> SELECT headline( 'A Leading manufacturer & Exporter of = TAJ=20 Brand Ice cream Plant & Dairy Equipments with complete plants in various=20 capacities. Pasteuriser, Homogenizer, Surface Cooler, Plate Chiller, Ageing= =20 Vat, Ice Cream Continuous Freezer, Single Flavour Softy, Bulk Milk Coolers.= '=20 , to_tsquery('ice&cream&plant') , 'StartSel=3D, StopSel=3D' ) ; headline ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------------------------------------- cream Plant & Dairy Equipments with complete plants in= =20 various capacities. Pasteuriser, Homogenizer, Surface Cooler, Plate Chiller= ,=20 Ageing Vat, Ice Cream (1 row) Regds Mallah. ------=_Part_1994_26590358.1117884416957 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi There,

We are using tsearch2 for FTS implementation. For highlighting the search t= erm
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 h= ow
to overcome this phenomenon.

tradein_clients=3D>   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=3D<b>, StopSel=3D</b>'  )    ;
            &nb= sp;            =             &nb= sp;            =             &nb= sp;            =             &nb= sp;  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.


------=_Part_1994_26590358.1117884416957--