[Xapian-discuss] get_matches_estimated and value range

Luca Barbieri lucabarb at gmail.com
Tue Oct 5 17:06:03 BST 2010


Thank you for your fast reply. :)

2010/10/5 Olly Betts <olly at survex.com>

>  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.
>

Can you explain please what kind of stats on values are involved? I'm not
sure I understand..
If I set "VALUE_RANGE 0 1286264160..1286264249", is this checked for the
estimate as the terms are?

If I ask fore more than 0 matches (or if I use the checkatleast) the query
slows down sensibly, and seems that xapian goes in a linear search on the
documents matched by the terms.


> 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.


ok, but my query has some control for the asked vaue ranges, and I'm sure
that I'am searching for values included in the [lower bound-upper bound] of
the database

thank you :)

-- 
---------------------
Luca Barbieri


More information about the Xapian-discuss mailing list