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
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster