Re: Term positions in GIN fulltext index

From: Marcin Mańk <marcin(dot)mank(at)gmail(dot)com>
To: Yoann Moreau <yoann(dot)moreau(at)univ-avignon(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Term positions in GIN fulltext index
Date: 2011-11-03 19:34:15
Message-ID: CAK61fk6-oG3s+wK3aJXwrbk5uAEspu__-pGc+D3TBzyH_nCDmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 3, 2011 at 4:52 PM, Yoann Moreau
<yoann(dot)moreau(at)univ-avignon(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2011-11-03 19:40:13 Re: Term positions in GIN fulltext index
Previous Message Tom Lane 2011-11-03 19:01:29 Re: Term positions in GIN fulltext index