[Xapian-discuss] MSet order

Richard Boulton richard at tartarus.org
Tue Mar 8 13:13:51 GMT 2011


There's no way to do this with the current Xapian matcher.  However,
what you can do is transform your weights so that they occur in
reverse order (note that they must still remain positive, though).

So, one option would be to change your get_sumpart() function to
return "max - w", where w is the value you're currently returning, and
max is the value returned by get_maxpart().

If get_maxpart() isn't returning a tight bound, eg, you've had to
return DBL_MAX for it, you might want to do a non-linear transform on
your data to squash it into a more reasonable range - though that
doesn't sound like it'll be a particular issue for you.

-- 
Celestial Navigation Limited, incorporated in England & Wales
(registration number 06978117), registered office address: 58
Kingsway, Duxford, Cambridgeshire, CB224QN, UK.



More information about the Xapian-discuss mailing list