Re: BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: vicreal(at)yandex(dot)ru, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4
Date: 2022-04-25 21:18:01
Message-ID: CAKFQuwZkjv7f_N8QYV-R=Spb87u7+eg1pYY4iz0r60MMThRREw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 25, 2022 at 2:03 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 17468
> Logged by: vicreal
> Email address: vicreal(at)yandex(dot)ru
> PostgreSQL version: 13.1
> Operating system: Debian 10
> Description:
>
>

> Test 3
> SELECT ts_rank_cd(to_tsvector('This function calculates the coverage
> density'), to_tsquery('function | calculates'), 4|1); -- 0.062 (X)
> SELECT ts_rank_cd(to_tsvector('This function calculates the coverage
> density'), to_tsquery('function'), 4|1); -- 0.062 (Y)
>
> How it should be:
> 1) In test 3 rank Y should be smaller, than rank X (as in test 2).
>
> 2) How get difference ranks Y < X when using normalization variant 4 ?
>

Why are you writing the number 5 as "4|1" (4 "bitwise or" 1) in Test 3?

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Артем Александров 2022-04-25 21:34:01 Re: BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4
Previous Message PG Bug reporting form 2022-04-25 20:18:16 BUG #17468: Ranking of search results: ts_rank_cd with normalization variant 4