[Xapian-discuss] get_matches_estimated and value range

Olly Betts olly at survex.com
Tue Oct 5 14:22:10 BST 2010


On Tue, Oct 05, 2010 at 12:04:36PM +0200, Luca Barbieri wrote:
> is it normal that the value range in my query is not evaluated? For each
> range i try, the estimated value is always the same, giving me a flat
> report.

If you ask for 0 matches, no documents will be considered - the
estimates given in this case are based only on the statistics available
about the terms and values involved.

The estimate could sometimes be better here, but probably not to the
extent you are hoping for I'm afraid.

The estimate (and min/max) should be 0 when the value range falls
completely outside the [lower bound, upper bound] range.  Currently that
isn't checked for, but I'm just testing a fix, and will commit it
shortly assuming the rest of the testsuite passes.

The bounds also don't make use of the count of set values which the
chert backend stores - if there's no value set in a slot for some
documents, that can be used to reduce the maximum number of documents
which can match a value range on that slot.  I'll take a look at making
use of this once the above change is committed.

Cheers,
    Olly



More information about the Xapian-discuss mailing list