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

Xapian nobody at xapian.org
Sat Feb 21 10:27:20 GMT 2009


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

Comment(by richard):

 I quite like the idea of deprecating the single parameter version -
 possibly even permanently.  It seems reasonable to require the direction
 of a sort to be specified, and I'm not sure it's ever going to be
 completely obvious which direction the default direction should be.

 However, for the same reason, I'm not very keen on the name "reversed"; if
 it's not clear what the default direction should be, it's not clear which
 way it is when reversed, either.

 I'd like to go for changing the name to "descending" immediately (since
 it's really a bug that it's named ascending), and deprecating the single-
 argument form.  In 2.0, if we add a default argument back, we can add it
 back with a value of false (this only works if there are several release
 series between 1.1 and 2.0, so that it is reasonable to expect all
 applications to have changed).  I don't think adding the default parameter
 back is not a terribly important step, though.

 Alternatively, we could deprecate all the set_sort_by_* functions which
 currently take an "ascending" parameter, and make a parallel set of
 functions with the signature which we actually want.
 "set_sorting_by_value_then_relevance(sort_key, descending=false)" for
 example.  I'm not particularly keen on this, but mention it as another
 idea for consideration...

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



More information about the Xapian-tickets mailing list