[Xapian-discuss] set_sort_by_relevance_then_value() sort order when using float

Henry henka at cityweb.co.za
Thu Dec 11 07:25:20 GMT 2008


Greetings,

I'm using revision 11684 with chert as the backend.

Sorting with set_sort_by_relevance_then_value(n) I'm getting the  
following unexpected behaviour:

"a" score:100 value(n):0.15
"b" score:99  value(n):0.15
"c" score:99  value(n):0
...
[ several matches with score:99, value(n):0 ]
...
"i" score:99  value(n):0.151801582149415   <-- should be ranked second.

value(n) is stored by the indexer with sortable_serialise().

Is it because value(n) is a float?  I found  
http://thread.gmane.org/gmane.comp.search.xapian.general/6460/focus=6469 which  
indicates that serialise_double() cannot be used for sorting.

Thanks
Henry




More information about the Xapian-discuss mailing list