From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Normalized Ranking example incorrect in text search
Date: Wed, 14 Nov 2007 14:37:22 -0500
Message-ID: <11802.1195069042@sss.pgh.pa.us> (raw)
In-Reply-To: <1195021491.4378.71.camel@ebony.site>
References: <1195021491.4378.71.camel@ebony.site>
Simon Riggs <simon@2ndquadrant.com> writes:
> http://developer.postgresql.org/pgdocs/postgres/textsearch-controls.html
> Ranking Search Results
> shows and example which says
> "This is the same example using normalized ranking"
> and then gives a query which calculates normalization in an incorrect
> manner,
On what basis do you claim that's an incorrect manner? It's exactly
what is described in the paragraph just before the examples.
> A correct example
> would be something like this:
> SELECT title, ts_rank_cd(textsearch, query, 8 /*Normalization*/) AS rank
Why is that correct (or more correct than other ways)?
> - Can we say what the differences are between the two ranking functions?
> Why do we have two?
We already say that: the _cd function doesn't work without positional
info in the input tsvector.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com
Subject: Re: Normalized Ranking example incorrect in text search
In-Reply-To: <11802.1195069042@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox