Re: tsearch2: word position

From: Markus Schiltknecht <markus(at)bluegap(dot)ch>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: tsearch2: word position
Date: 2007-02-21 15:57:03
Message-ID: 45DC6BCF.40304@bluegap.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Teodor,

Teodor Sigaev wrote:
> It's not supposed usage... Why do you need that?

Well, long story... I'm still using my own indexing on top of the
tsearch2 parsers and stemming.

However, two obvious cases come to mind:

- autocompletion, where I want to give the user one of the possible
known words. Currently, I'm returning the stemmed word, which is
obviously not quite right.

- highlighting of matching words

> Have a look to headline framework as an example or staring point.
> hlparsetext() returns parsed text with matched lexemes in tsquery.
> Small description of hlparsetext is placed at
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/HOWTO-parser-tsearch2.html
> near the end. Description of HLWORD struct is some out of day, sorry.

Thanks. I probably need to dig in the sources, though.

Markus

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-02-21 16:02:04 Re: postgresql vs mysql
Previous Message Teodor Sigaev 2007-02-21 15:39:31 Re: tsearch2: word position