Re: tsearch2: word position - Mailing list pgsql-general

From Markus Schiltknecht
Subject Re: tsearch2: word position
Date
Msg-id 45DC6BCF.40304@bluegap.ch
Whole thread Raw
In response to Re: tsearch2: word position  (Teodor Sigaev <teodor@sigaev.ru>)
List 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


pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: tsearch2: word position
Next
From: Scott Marlowe
Date:
Subject: Re: postgresql vs mysql