pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: pgsql-docs@postgresql.org
Subject: Normalized Ranking example incorrect in text search
Date: Wed, 14 Nov 2007 06:24:51 +0000
Message-ID: <1195021491.4378.71.camel@ebony.site> (raw)

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, yet without using the normalization parameter. A correct example
would be something like this:

SELECT title, ts_rank_cd(textsearch, query, 8 /*Normalization*/) AS rank
FROM apod, to_tsquery('neutrino|(dark & matter)') query
WHERE query @@ textsearch
ORDER BY rank DESC LIMIT 10;

I can't rerun the query because I don't have the example data set used.
Is that available?

This section also describes the two ranking functions supplied and
suggests you can write your own also.
- Can we say what the differences are between the two ranking functions?
Why do we have two?
- Can we supply or link to an example ranking function to allow people
to write their own?

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com




view thread (3+ messages)  latest in thread

Message-ID: <1195021491.4378.71.camel@ebony.site>
Permalink:  ../1195021491.4378.71.camel@ebony.site/
Also on:    postgresql.org/message-id/1195021491.4378.71.camel@ebony.site

 · 

reply

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: simon@2ndquadrant.com
  Subject: Re: Normalized Ranking example incorrect in text search
  In-Reply-To: <1195021491.4378.71.camel@ebony.site>

* 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