You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/12/01 13:34:45 UTC

[GitHub] [lucene] sonatype-lift[bot] commented on a change in pull request #438: LUCENE-10233: Store docIds as bitset to speed up addAll

sonatype-lift[bot] commented on a change in pull request #438:
URL: https://github.com/apache/lucene/pull/438#discussion_r760188396



##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java
##########
@@ -85,10 +103,64 @@ static void writeDocIds(int[] docIds, int start, int count, DataOutput out) thro
     }
   }
 
+  private static boolean isSorted(int[] docIds, int start, int count) {

Review comment:
       *UnusedMethod:*  Private method 'isSorted' is never used. [(details)](https://errorprone.info/bugpattern/UnusedMethod)
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)

##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java
##########
@@ -85,10 +103,64 @@ static void writeDocIds(int[] docIds, int start, int count, DataOutput out) thro
     }
   }
 
+  private static boolean isSorted(int[] docIds, int start, int count) {
+    for (int i = 1; i < count; ++i) {
+      if (docIds[start + i - 1] > docIds[start + i]) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  private static boolean isStrictlySorted(int[] docIds, int start, int count) {

Review comment:
       *UnusedMethod:*  Private method 'isStrictlySorted' is never used. [(details)](https://errorprone.info/bugpattern/UnusedMethod)
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)




-- 
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-unsubscribe@lucene.apache.org

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



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