Re: [GENERAL] Question about ranking & full text

2016-04-15 Thread Artur Zakirov
On 15.04.2016 15:47, Nicolas Paris wrote: Hi, I wonder why the third query returns 0. To me, it would return 0.1, because there is not baz in the text Thanks ! (pg 9.4) SELECT ts_rank_cd(apod.t, query,4) AS rank FROM (SELECT to_tsvector('foo baz') as t) as apod, to_tsquery('foo & baz') query WH

[GENERAL] Question about ranking & full text

2016-04-15 Thread Nicolas Paris
Hi, I wonder why the third query returns 0. To me, it would return 0.1, because there is not baz in the text Thanks ! (pg 9.4) SELECT ts_rank_cd(apod.t, query,4) AS rank FROM (SELECT to_tsvector('foo baz') as t) as apod, to_tsquery('foo & baz') query WHERE query @@ apod.t; rank| -