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.




Reply via email to