Skip site navigation (1) Skip section navigation (2)

Normalized Ranking example incorrect in text search

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Normalized Ranking example incorrect in text search
Date: 2007-11-14 06:24:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
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

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


pgsql-docs by date

Next:From: Leif B. KristensenDate: 2007-11-14 11:28:33
Subject: Re: Avoiding upgrade backlash
Previous:From: Peter EisentrautDate: 2007-11-14 05:41:51
Subject: Re: Obsolete references to GBorg in documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group