[Xapian-tickets] [Xapian] #498: Expose PostingSource::set_maxweight() to bindings

Xapian nobody at xapian.org
Mon Aug 2 12:31:17 BST 2010


#498: Expose PostingSource::set_maxweight() to bindings
-----------------------------+----------------------------------------------
 Reporter:  richard          |       Owner:  olly     
     Type:  enhancement      |      Status:  new      
 Priority:  normal           |   Milestone:  1.2.x    
Component:  Xapian-bindings  |     Version:  SVN trunk
 Severity:  normal           |    Keywords:           
Blockedby:                   |    Platform:  All      
 Blocking:                   |  
-----------------------------+----------------------------------------------
 It looks like the protected method {{{PostingSource::set_maxweight()}}}
 isn't available to wrapped {{{PostingSources}}}.  This means that they
 cannot cause the maxweight value for a posting source to be changed during
 the match process.  However, they can still return a custom maxweight by
 overriding their {{{get_maxweight();}}} method, which appears to be
 wrapped correctly, such that it will be called by the matcher.

 The documentation comment on the python {{{PostingSource}}} base class
 indicates that subclasses should call {{{set_maxweight();}}}  (this is the
 documentation which automatically comes from C++).  This is a bit
 confusing for users.

 It would be best to allow wrapped subclasses access to
 {{{set_maxweight()}}}.  Alternatively, the documentation should be updated
 to reflect that subclasses should just implement {{{get_maxweight()}}} and
 that the maxweight value cannot be changed during the search process.

 In addition, we don't seem to have any test coverage in the Xapian
 bindings for PostingSources which return non-zero weights.  This should be
 added.

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



More information about the Xapian-tickets mailing list