[Xapian-discuss] Matches estimate varies with sorting method

Olly Betts olly at survex.com
Thu Oct 25 02:32:11 BST 2007


On Mon, Oct 22, 2007 at 07:09:06PM +0800, Fabrice Colin wrote:
> When sorting by relevance, all three get_matches methods return 10.

The problem here is for the case where checkatleast is set, and we're
sorting by relevance with forward ordering by docid, and the query is 
pure boolean.  The optimisation to terminate processing fires before
the checkatleast requirement is satisfied, and adjustments made to the
estimated and max statistics based on checkatleast then make the
statistics wrong in the way we see.

Can you confirm this patch fixes it for you:

http://oligarchy.co.uk/xapian/patches/xapian-fix-checkatleast-boolean-sortforward.patch

Cheers,
    Olly



More information about the Xapian-discuss mailing list