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

From Marcin Mańk
Subject Re: Term positions in GIN fulltext index
Date
Msg-id CAK61fk6-oG3s+wK3aJXwrbk5uAEspu__-pGc+D3TBzyH_nCDmw@mail.gmail.com
Whole thread Raw
In response to Term positions in GIN fulltext index  (Yoann Moreau <yoann.moreau@univ-avignon.fr>)
List pgsql-hackers
On Thu, Nov 3, 2011 at 4:52 PM, Yoann Moreau
<yoann.moreau@univ-avignon.fr> wrote:
> I'd need a function like this :
> select term_positions(text, 'get') from docs;
>  id_doc | positions
> --------+-----------
>      1 |     {2,6}
>      2 |       {3}
>

check this out:
http://www.postgresql.org/docs/current/static/textsearch-debugging.html
ts_debug does what You want, and more. Look at it's source - it`s a
plain sql function, You can make something based on it.

Greetings
Marcin Mańk


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Term positions in GIN fulltext index
Next
From: Alexander Korotkov
Date:
Subject: Re: Term positions in GIN fulltext index