jpountz commented on a change in pull request #779: LUCENE-8762: Introduce
Specialized Impacts For Doc + Freq
URL: https://github.com/apache/lucene-solr/pull/779#discussion_r304360904
##########
File path:
lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50PostingsReader.java
##########
@@ -1761,6 +1763,223 @@ public long cost() {
}
+ final class BlockImpactsDocsEnum extends ImpactsEnum {
+
+ private final byte[] encoded;
+
+ private final int[] docDeltaBuffer = new int[MAX_DATA_SIZE];
+ private final int[] freqBuffer = new int[MAX_DATA_SIZE];
+
+ private int docBufferUpto;
+
+ private final Lucene50ScoreSkipReader skipper;
+
+ final IndexInput docIn;
+
+ final boolean indexHasPos;
+ final boolean indexHasOffsets;
+ final boolean indexHasPayloads;
+ final boolean indexHasFreq;
+
+ private int docFreq; // number of docs in
this posting list
+ private int docUpto; // how many docs we've
read
+ private int doc; // doc we last read
+ private int accum; // accumulator for doc
deltas
+ private int freq; // freq we last read
+
+ private boolean needsFreq; // true if the caller actually needs frequencies
Review comment:
This will always be true, it is illegal to read impacts and not ask for term
frequencies (it doesn't make much sense).
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]