lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <>
Subject Re: Custom Sorting Algorithm
Date Wed, 04 Feb 2009 20:48:10 GMT
It would not be simple to use a new algorithm. The current 
implementation takes place at the Lucene level and uses a priority 
queue. When you ask for the top n results, a priority queue of size n is 
filled with all of the matching documents. The ordering in the priority 
queue is the sort. The on Sort method orders by relevance score - the 
Sort method orders by field, relevance, or doc id.

- Mark

wojtekpia wrote:
> That's not quite what I meant. I'm not looking for a custom comparator, I'm
> looking for a custom sorting algorithm. Is there a way to use quick sort or
> merge sort or... rather than the current algorithm? Also, what is the
> current algorithm?
> Otis Gospodnetic wrote:
>> You can use one of the exiting function queries (if they fit your need) or
>> write a custom function query to reorder the results of a query.

View raw message