[Xapian-tickets] [Xapian] #311: set_sort_by_value has incorrect sense for 'ascending'
Xapian
nobody at xapian.org
Sat Feb 21 09:29:17 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 olly):
We could go for "reversed", split the function into two overloaded forms
rather than having a default parameter, and deprecate the single argument
form. In the more distant future (2.0, say) we could consider adding a
default parameter value of {{{reversed=false}}}. I think the end result
is probably the best API here. The API deprecation is an annoyance for
users so we shouldn't do this lightly, though sorting isn't used by
everyone and the change required is at least simple and the updated code
will work on existing releases.
The other sane alternative I can see is to go for "descending", and keep
the default value of
"true". This would make the default sort order (if you don't specify the
direction):
1. zebra
2. yacht
3. x-ray
4. ...
or for numbers:
1. 9
2. 8
3. 7
4. ...
which I think isn't so natural.
Of these, I think the first is my current preference. Thoughts? Any
other options anyone can see?
--
Ticket URL: <http://trac.xapian.org/ticket/311#comment:9>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list