romseygeek commented on code in PR #14776:
URL: https://github.com/apache/lucene/pull/14776#discussion_r2145919558


##########
lucene/core/src/java/org/apache/lucene/search/ScoreDoc.java:
##########
@@ -51,4 +52,16 @@ public ScoreDoc(int doc, float score, int shardIndex) {
   public String toString() {
     return "doc=" + doc + " score=" + score + " shardIndex=" + shardIndex;
   }
+
+  /** Utility comparator that sorts by score descending, then by docId 
ascending */
+  public static final Comparator<ScoreDoc> scoreDocComparator =

Review Comment:
   Nit: constants are usually in uppercase, so I'd rename this to just 
`COMPARATOR` as it will always be accessed like `ScoreDoc.COMPARATOR`.



-- 
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