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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Wed, 21 Feb 2007 16:57:03 +0100
  • Message-id: <45DC6BCF(dot)40304(at)bluegap(dot)ch>

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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group