Search Postgresql Archives

Re: tsearch2: word position

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux