HoustonPutman commented on issue #14455: URL: https://github.com/apache/lucene/issues/14455#issuecomment-2798129113
Can two different docs have the same id? I don't think so. Then your example is functionally the same as it is now. In my mind, it would be: ```java Comparator<ScoreDoc> sortDocComparator = Comparator.<ScoreDoc>comparingDouble(sd -> sd.score).reversed(); if (!useStableSort) { sortDocComparator = sortDocComparator.thenComparingInt(sd -> sd.doc); } ``` I just don't think the docId comparison needs to be there. And at the very least, it should be an option to use a stableSort instead of sorting on docId for ties. -- 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