From: Tom Lane <tgl@sss.pgh.pa.us>
To: b wragg <bwragg@tpg.com.au>
Cc: pgsql-performance@postgresql.org
Subject: Re: Improve Full text rank in a query
Date: Fri, 07 Mar 2008 00:40:13 -0500
Message-ID: <6689.1204868413@sss.pgh.pa.us> (raw)
In-Reply-To: <000b01c88007$8c07b1a0$0502a8c0@windoze>
References: <000b01c88007$8c07b1a0$0502a8c0@windoze>
"b wragg" <bwragg@tpg.com.au> writes:
> I'm new to this, but I can't figure out why the "Gunbower Island Primary
> School" is getting top place. How do I get the query to improve the ranking
> so that an exact match (like "Gunbower|Island|Vic") gets a higher position?
I'm new at this too, but AFAICS these are both exact matches: they have
the same matching lexemes at the same positions, so the basic rank
calculation is going to come out exactly the same. Normalization option
32 doesn't help (as the manual notes, it's purely cosmetic). So it's
random chance which one comes out first.
What I think you might want is one of the other normalization options,
so that shorter documents are preferred. Either 1, 2, 8, or 16 would
do fine for this simple example --- which one you want depends on just
how heavily you want to favor shorter documents.
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, bwragg@tpg.com.au
Subject: Re: Improve Full text rank in a query
In-Reply-To: <6689.1204868413@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