Re: Tsearch2 ranking - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: Tsearch2 ranking
Date
Msg-id 4415C5F8.1010001@sigaev.ru
Whole thread Raw
In response to Tsearch2 ranking  (Hannes Dorbath <light@theendofthetunnel.de>)
List pgsql-general
Order of terms in ts_query hasn't any meaning in current implementation. But you
can use your own ranking function.

Hannes Dorbath wrote:
> 2 rows of tsvector:
>
> 'bar':2 'baz':3 'foo':1
> 'bar':2 'baz':1 'foo':3
>
> so source text was:
>
> foo bar baz
> baz bar foo
>
> ts_query now is 'foo&baz&baz', so both matched.
>
> How can I honor the correct order of the first row and rank it higher?
> The position information is there, why doesn't rank() / rank_cd() not
> use it?
>
> Is there any way to make a difference between those to rows? Any? Even
> if it's a bad hack? I really need it :/
>
> Thanks in advance
>
>

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

pgsql-general by date:

Previous
From: Chris Kratz
Date:
Subject: Re: multi-column aggregates
Next
From: Chris Kratz
Date:
Subject: Re: multi-column aggregates