Question about ranking & full text

Поиск
Список
Период
Сортировка
От Nicolas Paris
Тема Question about ranking & full text
Дата
Msg-id CA+ssMOShk+tir9gbcL0HR-s3CrpjHjxthxrTVMRKYd9o3HMfeA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about ranking & full text  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Список pgsql-general
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        |
------------|
0.100000001 |

SELECT ts_rank_cd(apod.t, query,4) AS rank
FROM (SELECT to_tsvector('foo ') as t) as apod, to_tsquery('foo & ! baz') query
WHERE query @@ apod.t;

rank        |
------------|
0.100000001 |

SELECT ts_rank_cd(apod.t, query,4) AS rank
FROM (SELECT to_tsvector('foo ') as t) as apod, to_tsquery(' ! baz') query
WHERE query @@ apod.t;

rank        |
------------|
0.0         |


В списке pgsql-general по дате отправления:

Предыдущее
От: Alexey Bashtanov
Дата:
Сообщение: Re: Deadlock between VACUUM and ALTER TABLE commands
Следующее
От: Artur Zakirov
Дата:
Сообщение: Re: Question about ranking & full text