easyice commented on code in PR #12658: URL: https://github.com/apache/lucene/pull/12658#discussion_r1357058015
########## lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java: ########## @@ -519,9 +526,8 @@ private Runnable writeFieldNDims( // compute the min/max for this slice computePackedValueBounds( values, 0, Math.toIntExact(pointCount), minPackedValue, maxPackedValue, scratchBytesRef1); - for (int i = 0; i < Math.toIntExact(pointCount); ++i) { - docsSeen.set(values.getDocID(i)); - } + // docCount has already been set by {@link BKDWriter#writeField} + assert docCount != -1; Review Comment: yes, you are right, we can add the assert in `writeField` too, this is more rigorous, unless the merges can also avoid using `docSeen`, that might be some differences -- 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