Closed sebastian-philipp closed 10 years ago
Looks like paging is done before sorting? Looks wired.
That's of course a bug, but it's not totally a show stopper. This effect occurs when a lot of results have the same score, with map there are lots of documents with score 3.225 (45 documents). The sorting algorithm (a priority queue with limited capacity, rather efficient) is currently nondeterministic for equal scores, and that raises the problem with paging, so that has to be corrected.
that is ok, if the most important results stay at the top of the results
ranking of search results done with a LimitedPriorityQueue
implementation independent of Score
. Sorting is done with wrapper types for Document
and (Word, Score)
with an appropriate total ordering of elements. There is no longer any non determinism in the ranking algorithm, even with equal scores, so paging should work as if the complete result list is sorted and then the interval of results is extracted with drop and take.
this makes paging completely useless
I've discoverd this, while reasearching for https://github.com/hunt-framework/hayoo/issues/18