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

Xapian nobody at xapian.org
Mon Nov 3 12:01:57 GMT 2008


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

  * component:  Matcher => Documentation


Comment:

 For reference, that demo gives the following output for me:

 {{{
 asc=True:
 3
 2
 1

 asc=False:
 1
 2
 3
 }}}

 I'm guessing you expected the order of the results in each case to be the
 opposite of that.

 The problem is a question of what is meant by ascending.  One
 interpretation could be that as you iterate through the result set of a
 search in ascending order, the values should ascend.  Another
 interpretation could be that ascending order means that documents which
 have higher values are considered "better" (ie, get ranked higher).
 Xapian uses the latter interpretation.

 Personally, I think this is a mistake, and it would be less confusing to
 users if iterating through the result set of an ascending search resulted
 in the values ascending (and that the default sort order was by descending
 relevance).  However, changing this at this stage would break all existing
 applications.  What we do need to do is improve the documentation to make
 it clear what Xapian means by "ascending" (so I've changed the component
 of this bug accordingly).

 (For reference, in my xappy API, I define ascending in the opposite way to
 xapian, since I believe this results in less confusion for users.)

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



More information about the Xapian-tickets mailing list