Re: Term positions in GIN fulltext index - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Term positions in GIN fulltext index
Date
Msg-id CAPpHfdtVWHJR3C5WKYHPxBajT5mtmGPKbdOQGrhxGTcACeNZ-A@mail.gmail.com
Whole thread Raw
In response to Re: Term positions in GIN fulltext index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On Thu, Nov 3, 2011 at 11:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Yoann Moreau <yoann.moreau@univ-avignon.fr> writes:
> I'm using a GIN index for a text column on a big table. I use it to rank
> the rows, but I also need to get the term positions for each document of a
> subset of documents for one or more terms. I suppose these positions are stored
> in the index as the to_tsvector shows them : 'lexeme':{positions}

I'm pretty sure that a GIN index on tsvector does *not* store positions
--- it only knows about the strings.  Don't know one way or the other
about GIST.
GiST index doesn't store positions too. See gtsvector_compress. It converts tsvector to array of crc32 of words. If that value is anyway too large then function converts it to signature.

------
With best regards,
Alexander Korotkov. 

pgsql-hackers by date:

Previous
From: Marcin Mańk
Date:
Subject: Re: Term positions in GIN fulltext index
Next
From: "Kevin Grittner"
Date:
Subject: Re: warning in pg_upgrade