Re: [DOCS] Ts_rank_cd function

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: [DOCS] Ts_rank_cd function
Дата
Msg-id CAF4Au4zsaerTTi1+T5euv06BEpe+RyKS+j5iQpim85x8TcykMg@mail.gmail.com
обсуждение исходный текст
Ответ на [DOCS] Ts_rank_cd function  (hmidi slim <hmidi.slim2@gmail.com>)
Список pgsql-docs
On Fri, Nov 3, 2017 at 12:01 PM, hmidi slim <hmidi.slim2@gmail.com> wrote:
> I'm trying to use the ranking function ts_rank_cd to rank the result. I
> understand that the function ts_rank 'Ranks vectors based on the frequency
> of their matching lexemes.'.
> However the definition of ts_rank_cd mention that  ' This function computes
> the cover density ranking for the given document vector and query, as
> described in Clarke, Cormack, and Tudhope's "Relevance Ranking for One to
> Three Term Queries" in the journal "Information Processing and Management",
> 1999. Cover density is similar to ts_rank ranking except that the proximity
> of matching lexemes to each other is taken into consideration.'
>
> In the example of the official documentation:
>
> SELECT title, ts_rank_cd(textsearch, query) AS rank
> FROM apod, to_tsquery('neutrino|(dark & matter)') query
> WHERE query @@ textsearch
> ORDER BY rank DESC
> LIMIT 10;
>                      title                     |   rank
> -----------------------------------------------+----------
>  Neutrinos in the Sun                          |      3.1
>  The Sudbury Neutrino Detector                 |      2.4
>
> Why the first result has a rank higher than the second example?

Ranking was done using textsearch column, which conists of title, body
and keywords, but only titles were shown. I'll replace
this example by more clear one.

Thanks for report,

Oleg


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

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

Предыдущее
От: hmidi slim
Дата:
Сообщение: [DOCS] Ts_rank_cd function
Следующее
От: hmidi slim
Дата:
Сообщение: [DOCS] What's the difference between the ts_rank and ts_rank_cd?