jpountz commented on code in PR #13692: URL: https://github.com/apache/lucene/pull/13692#discussion_r1732885915
########## lucene/core/src/java/org/apache/lucene/codecs/lucene912/Lucene912PostingsReader.java: ########## @@ -509,15 +547,14 @@ private void refillRemainder() throws IOException { if (docFreq == 1) { docBuffer[0] = singletonDocID; freqBuffer[0] = totalTermFreq; - docBuffer[1] = NO_MORE_DOCS; docCountUpto++; } else { // Read vInts: PostingsUtil.readVIntBlock(docIn, docBuffer, freqBuffer, left, indexHasFreq, needsFreq); prefixSum(docBuffer, left, prevDocID); - docBuffer[left] = NO_MORE_DOCS; docCountUpto += left; } + Arrays.fill(docBuffer, left, docBuffer.length, NO_MORE_DOCS); Review Comment: Right, you are reminding me that I wanted to make it better as this could be a slowdown for multi-term queries. In practice we don't need the whole tail of the buffer to be filled with NO_MORE_DOCS but only the last 4 values. -- 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