[Xapian-tickets] [Xapian] #464: get_matches_estimated() can be wrong when collapsing

Xapian nobody at xapian.org
Thu Apr 15 10:39:59 BST 2010


#464: get_matches_estimated() can be wrong when collapsing
---------------------+------------------------------------------------------
 Reporter:  olly     |       Owner:  olly 
     Type:  defect   |      Status:  new  
 Priority:  normal   |   Milestone:  1.1.6
Component:  Matcher  |     Version:  1.1.4
 Severity:  normal   |    Keywords:       
Blockedby:           |    Platform:  All  
 Blocking:           |  
---------------------+------------------------------------------------------

Comment(by richard):

 I've just been trying to replicate this problem using the supplied
 database, xapian trunk, and the python bindings, but have had no success
 so far.  For the record, the script I'm using is:

 {{{
 import xapian
 db=xapian.Database('../../../tmp/default/')
 qp=xapian.QueryParser()
 qp.set_database(db)
 qp.add_boolean_prefix('catalog', 'XCATALOG')
 qp.add_boolean_prefix('productgroup', 'XPRODUCTGROUP')
 q=qp.parse_query ('(catalog:2 OR catalog:425) AND productgroup:6')
 e = xapian.Enquire(db)
 e.set_sort_by_value(1, True)
 e.set_collapse_key (0)
 e.set_query (q)
 def display(mset):
     print mset.get_matches_lower_bound(), \
           mset.get_matches_estimated(), \
           mset.get_matches_upper_bound()

 display(e.get_mset(0, 10))
 # prints 48 392 438
 display(e.get_mset(0, 10, 1000))
 # prints 417 417 417

 }}}

 The output of this seems to be self-consistent (but, interestingly, the
 number of results is 1 less than that reported in the email from the
 original reporter).

 I think it's possible that this is a problem in omega, not in the matcher.

-- 
Ticket URL: <http://trac.xapian.org/ticket/464#comment:2>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list