neoremind commented on a change in pull request #91:
URL: https://github.com/apache/lucene/pull/91#discussion_r630693579



##########
File path: 
lucene/core/src/test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java
##########
@@ -180,15 +189,16 @@ private static BKDConfig createRandomConfig() {
   }
 
   private static Point[] createRandomPoints(
-      BKDConfig config, int maxDoc, int[] commonPrefixLengths) {
+      BKDConfig config, int maxDoc, int[] commonPrefixLengths, boolean 
isDocIdIncremental) {
     assertTrue(commonPrefixLengths.length == config.numDims);
     final int numPoints = TestUtil.nextInt(random(), 1, 100000);
     Point[] points = new Point[numPoints];
-    if (random().nextInt(5) != 0) {
+    if (random().nextInt(10) != 0) {
       for (int i = 0; i < numPoints; ++i) {
         byte[] value = new byte[config.packedBytesLength];
         random().nextBytes(value);
-        points[i] = new Point(value, random().nextInt(maxDoc));
+        points[i] =
+            new Point(value, isDocIdIncremental ? Math.min(i, maxDoc) : 
random().nextInt(maxDoc));

Review comment:
       Good catch!




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

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