gf2121 commented on code in PR #14390: URL: https://github.com/apache/lucene/pull/14390#discussion_r2008706856
########## lucene/core/src/java/org/apache/lucene/codecs/lucene101/Lucene101PostingsReader.java: ########## @@ -1059,6 +1059,29 @@ private void bufferIntoBitSet(int start, int end, FixedBitSet bitSet, int offset } } + @Override + public int docIDRunEnd() throws IOException { + // Note: this assumes that BLOCK_SIZE == 128, this bit of the code would need to be changed if Review Comment: Nit: Can we assert this assumption here? As i tried to change `BLOCK_SIZE` before, i personally prefer an explicit AssertionError rather than comments :) ########## lucene/core/src/java/org/apache/lucene/index/CheckIndex.java: ########## @@ -2458,6 +2469,31 @@ private static void checkTermsIntersect(Terms terms, Automaton automaton, BytesR } } + private static void checkDocIDRuns(DocIdSetIterator iterator) throws IOException { + int prevDoc = -1; + int runEnd = 0; + for (int doc = iterator.nextDoc(); Review Comment: Do we also need to test `docIDRunEnd` works properly against operations other than `nextDoc`? E.g. `advance`, `intoBitset`, `advanceShallow`. -- 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