[Xapian-discuss] Result Priorities

Olly Betts olly at survex.com
Mon Sep 6 12:25:06 BST 2004


On Mon, Sep 06, 2004 at 09:38:52AM +0100, James Aylett wrote:
> On Wed, Aug 25, 2004 at 01:42:46AM +0100, Olly Betts wrote:
> 
> > Currently documents which compare equal when sorting are ordered by
> > document id (you can choose increasing or decreasing).  It wouldn't
> > be too hard to allow relevance order to be used when the sort compares
> > equal.
> 
> It strikes me that having relevance as the implicit second sort key
> here would almost always be more useful than document id.

I agree it's useful to be able to choose, but I'm not sure I agree that
relevance is almost always more useful.

In some cases the sort keys are unique (or very close to) in which case
what the secondary ordering is isn't important.  We just want to have an
ordering which ensures a stable sort (by never equating two different
documents).

And in some other applications, sorting equal documents by date is
desirable and the docid ordering can often be arranged to approximate
date order.

> At the very least it should probably be an option - does anyone
> disagree with me, or can it go on the list?

It's on my list, but I certainly don't mind if someone else implements
it before I get round to it!

The change in the matcher is pretty trivial I believe - writing a good
test case to check it works and to make sure it keeps working will take
most of the time I suspect...

Cheers,
    Olly



More information about the Xapian-discuss mailing list