jpountz commented on PR #13773:
URL: https://github.com/apache/lucene/pull/13773#issuecomment-2346309641

   TopScoreDocCollectorManager is supposed to return the top-N results that 
have the best score, tie-broken by doc ID. So (docID=0, score=1) compares 
better than (docID=155, score=1) and should appear first in the resulting top 
docs.
   
   > I think that we are still early terminating though or you mean that we 
shouldn't have as there were docs with same score but lower doc ids?
   
   Right.
   
   Looking at the code, it looks like the problem is here: 
https://github.com/apache/lucene/blob/ff8b81afc59dc09ea4dfdd02a58398f08fcad8a8/lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollector.java#L260.
 If a segment has two partitions, then its leaf collectors will collect hits 
with the same "docBase", so the tie-breaking logic will not know that hits from 
the first partition should compare better than hits from the second partition.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to