[Xapian-tickets] [Xapian] #311: set_sort_by_value has incorrect sense for 'ascending'

Xapian nobody at xapian.org
Sun Nov 9 21:03:09 GMT 2008


#311: set_sort_by_value has incorrect sense for 'ascending'
---------------------------+------------------------------------------------
 Reporter:  tommortimer    |        Owner:  olly    
     Type:  defect         |       Status:  new     
 Priority:  normal         |    Milestone:  1.1.0   
Component:  Documentation  |      Version:  SVN HEAD
 Severity:  minor          |   Resolution:          
 Keywords:                 |    Blockedby:          
 Platform:  All            |     Blocking:          
---------------------------+------------------------------------------------

Comment(by olly):

 Hmm, this does seem backwards.  Shame you didn't point it out rather than
 just making xappy different (an inconsistency which is itself potentially
 confusing...)

 We obviously can't just change what the ascending parameter means here or
 we'll drive existing users mad.

 Changing the parameter name isn't a bad option.  It could be "reversed"
 rather than "descending" which might be less confusing (and deals better
 with any arguments about what "ascending" means here, though I think the
 current interpretation is odd at best).

 Another (for source-level compatibility at least) would be to make this
 use the same enum as docid order, and provide an overloaded form taking
 bool for backward compatibility, and perhaps mark that as deprecated.  The
 DONT_CARE option doesn't make sense here, and the type name is
 docid_order, but it would make code using the API more explicit than
 passing true or false does.

 I'm not sure I have a favoured option currently.  I think I need to mull
 it over.

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



More information about the Xapian-tickets mailing list