Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3B1122E2762 for ; Wed, 14 Nov 2007 15:37:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 68541-04 for ; Wed, 14 Nov 2007 15:37:24 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 648552E1973 for ; Wed, 14 Nov 2007 15:37:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lAEJbN0c011803; Wed, 14 Nov 2007 14:37:23 -0500 (EST) To: Simon Riggs cc: pgsql-docs@postgresql.org Subject: Re: Normalized Ranking example incorrect in text search In-reply-to: <1195021491.4378.71.camel@ebony.site> References: <1195021491.4378.71.camel@ebony.site> Comments: In-reply-to Simon Riggs message dated "Wed, 14 Nov 2007 06:24:51 +0000" Date: Wed, 14 Nov 2007 14:37:22 -0500 Message-ID: <11802.1195069042@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/54 X-Sequence-Number: 4587 Simon Riggs 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