[Xapian-discuss] Is there a secondary sorting possible for relevance-sorts?

Olly Betts olly at survex.com
Mon Nov 13 16:11:27 GMT 2006


On Mon, Nov 13, 2006 at 02:08:19PM +0100, Arjen van der Meijden wrote:
> Is my assumption about the "secondary" ordering correct? And is there an 
> option to get the desired behaviour with Omega?

You either want:

Xapian::Enquire::set_sort_by_relevance_then_value(VALUE);

or:

Xapian::Enquire::set_docid_order(Xapian::Enquire::DESCENDING);

The later is cheaper, but sorts by the document id for documents with
equal relevance, which is will generally favour newer discussions over
older ones because older ones will have been indexed before newer ones.
But it's problematic if a full reindex is done and documents added in
arbitrary order.

You can't currently access either from Omega, but that probably should
be fixed.

Cheers,
    Olly



More information about the Xapian-discuss mailing list