jpountz commented on code in PR #14164:
URL: https://github.com/apache/lucene/pull/14164#discussion_r1926977463


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene101/Lucene101PostingsReader.java:
##########
@@ -388,6 +388,7 @@ private enum DeltaEncoding {
     final boolean needsOffsetsOrPayloads;
     final boolean needsImpacts;
     final boolean needsDocsAndFreqsOnly;
+    final boolean needsDocsOnly;

Review Comment:
   I believe that we do not need to track a separate variable as it should 
always be the same as `needsFreq == false` (`needsFreq` should always be true 
whenever positions or impacts are needed).



##########
lucene/core/src/java/org/apache/lucene/codecs/lucene101/Lucene101PostingsReader.java:
##########
@@ -345,7 +345,7 @@ private enum DeltaEncoding {
     private int prevDocID; // last doc ID of the previous block
 
     private int docBufferSize;
-    private int docBufferUpto;
+    private int docBufferUpto; // only makes sense for packed encoding

Review Comment:
   The comment is a bit misleading: it makes sense for the bitset encoding, but 
in this case it's only the index into the freq buffer, not into the doc buffer.



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

Reply via email to