LuXugang commented on code in PR #12405:
URL: https://github.com/apache/lucene/pull/12405#discussion_r1266460078


##########
lucene/core/src/java/org/apache/lucene/search/comparators/IntComparator.java:
##########
@@ -98,19 +99,30 @@ public void copy(int slot, int doc) throws IOException {
     @Override
     protected boolean isMissingValueCompetitive() {
       int result = Integer.compare(missingValue, bottom);
-      // in reverse (desc) sort missingValue is competitive when it's greater 
or equal to bottom,
-      // in asc sort missingValue is competitive when it's smaller or equal to 
bottom
-      return reverse ? (result >= 0) : (result <= 0);
+      return reverse
+          ? (pruning == Pruning.SKIP_MORE ? result > 0 : result >= 0)
+          : (pruning == Pruning.SKIP_MORE ? result < 0 : result <= 0);
     }
 
     @Override
     protected void encodeBottom(byte[] packedValue) {
-      IntPoint.encodeDimension(bottom, packedValue, 0);
+      if (pruning == Pruning.SKIP_MORE) {
+        IntPoint.encodeDimension(reverse ? bottom + 1 : bottom - 1, 
packedValue, 0);
+      } else {
+        IntPoint.encodeDimension(bottom, packedValue, 0);
+      }

Review Comment:
   addressed in 
[ef9f917](https://github.com/apache/lucene/pull/12405/commits/ef9f9173bbba04871dd489187cbdc26505d64418)



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