[Xapian-discuss] Feature requests

Markus Wörle mrks at mrks.de
Tue Feb 20 18:07:45 GMT 2007


Hi!

I would like to suggest two new features for xapian:

* I use sorting by_value_then_relevance in some cases. In this  
condition it happens that if both value and relevance of documents  
are equal, the sorting between those documents becomes unstable, that  
is, the order of those documents may differ from query to query.  
Together with paging, this leads to unexpected behaviour while  
browsing pages of query-results like duplicate or missing entries.

One way to solve this is to use unique values for sorting, eg. to  
concatenate a value which contains a date, with an unique document  
id. Currently, my indexer will have to do that. This is where my  
first feature-request applies:

It would be nice if it would be possible to set more than one value  
to sort the results by, and to choose a particular order (ascending/ 
descending) for each value. Beyond, it would be practical to have a  
possibility to freely mix up  several values together with the  
relevance. E.g.:

"sort by value 0 ascending, then relevance ascending, then value 1  
descending"
(where value 1 could be a token that makes the sorting unique, to  
solve my initial problem)

* The second thing is also something that would be easy to build into  
the client-software, but might be also a proper feature for xapian:   
Indexed terms can have positional informations. It would be handy to  
regain the information on which (positional indexed) terms a hit  
occured within the result, e.g. to generate previews that actually  
contain the requested tokens.

Regards,
mrks



More information about the Xapian-discuss mailing list