Skip site navigation (1) Skip section navigation (2)

tsearch2 question...

From: "Net Virtual Mailing Lists" <mailinglists(at)net-virtual(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: tsearch2 question...
Date: 2003-10-19 14:23:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

I have a quick question regarding tsearch2, hopefully this is an okay
place to ask because I couldn't find a tsearch2-specific mailing list..

Anyways, when the field which is indexed using tsearch2 is displayed in
it's entirety I want the searched keywords to be highlighted, just as in
a headline except that the entire document gets displayed instead of just
a summary of it..

In order for this to work well, it would seem that I need the same code
path as that used to generate the headline to begin with, otherwise
differences in stemming/etc could cause mis-matches...

My thought was to do:

SELECT bodytext_id,headline(bodytext,
MaxWords=999999999,MinWords=999999999,ShortWord=0') FROM some_table WHERE

Does this seem like a 'reasonable' way to do this?... In not is there a
better way that you can think of?...


- GReg


pgsql-general by date

Next:From: Holger MarzenDate: 2003-10-19 17:08:45
Subject: Re: ShmemAlloc errors
Previous:From: Stephan SzaboDate: 2003-10-19 07:31:43
Subject: Re: convert string function and built-in conversions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group