View Single Post

   
  #2 (permalink)  
Old 04-09-2008, 02:08 PM
Teodor Sigaev
 
Posts: n/a
Default Re: tsearch2: word position

> I'm fiddling with to_tsvector() and parse() from tsearch2, trying to get
> the word position from those functions. I'd like to use the tsearch2
> parser and stemmer, but I need to know the exact position of the word as
> well as the original, unstemmed word.


It's not supposed usage... Why do you need that?

> And this only tells me a word position, not a character or byte position
> within the string. Is there a way to get this information from tsearch2?


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/postgr...-tsearch2.html
near the end. Description of HLWORD struct is some out of day, sorry.

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Reply With Quote