[Xapian-tickets] [Xapian] #590: MSetIterator::get_percent Shows Increased Values When Using Query::OP_FILTER

Xapian nobody at xapian.org
Sun Mar 18 19:00:33 GMT 2012


#590: MSetIterator::get_percent Shows Increased Values When Using
Query::OP_FILTER
---------------------+------------------------------------------------------
 Reporter:  mhenson  |       Owner:  olly
     Type:  defect   |      Status:  new 
 Priority:  normal   |   Milestone:      
Component:  Other    |     Version:      
 Severity:  normal   |   Blockedby:      
 Platform:  All      |    Blocking:      
---------------------+------------------------------------------------------
 I'm seeing some rather odd behavior with respect to the match percent that
 is returned when performing a simple query. It appears that the addition
 of a filter to a simple OR query will not affect the weight of the match,
 but will increase the percent of the resulting match. According to the
 documentation for MSetIterator::get_percent
 (http://xapian.org/docs/apidoc/html/classXapian_1_1MSetIterator.html#99514c11a9291175d20fafa73a0839fd)
 a match should only get 100% if it matches all of the weight contributing
 terms in the query.

 I've attached a test case that shows the odd behavior that I am seeing. I
 had a database with 2 documents, each with one term 'cold' and 'kid'. Each
 document also has a boolean term for the owner of the document 'Ome'.

 Below are the results for a search for 'cold kids' on that set with and
 without the owner filter. The weight 0.405465108108 stays the same for
 both queries, but the percentage increases from 50 to 100 with the
 addition of the filter.

 Query: Xapian::Query((cold OR kids))
 1 - 0.405465108108 - 50 - Ome, cold
 2 - 0.405465108108 - 50 - Ome, kids

 Query: Xapian::Query(((cold OR kids) FILTER Ome))
 1 - 0.405465108108 - 100 - Ome, cold
 2 - 0.405465108108 - 100 - Ome, kids

-- 
Ticket URL: <http://trac.xapian.org/ticket/590>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list