On 04/11/11 12:15, Florian Pflug wrote:
> AFAICS, the internal storage layout of tsvector should allow you to extract an
> individual lexem's positions quite efficiently (with time complexity log(N) where
> N is the number of lexems in the tsvector). Doing so will require you to implement
> your function in C though - any solution that works from a tsvector's textual
> representation will obviously have time complexity N.
>
> best regards,
> Florian Pflug
>
I'll do a pl/pgsql function first, I need to test it with other parts of
the project. But I will look for more efficient algorithms for a C
function as soon as possible if we still decide to use the postgresql
fulltext engine.
Regards,
Yoann Moreau