Fix lazy decoding of frequencies in `BlockImpactsDocsEnum`. (#12668)

The code was written as if frequencies should be lazily decoding, except that
when refilling buffers freqs were getting eagerly decoded instead of lazily.
This commit is contained in:
Adrien Grand 2023-10-13 10:42:34 +02:00 committed by GitHub
parent 06341ffe1d
commit afc990cd2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -183,6 +183,9 @@ Optimizations
* GITHUB#12631: Write MSB VLong for better outputs sharing in block tree index, decreasing ~14% size
of .tip file. (Guo Feng)
* GITHUB#12668: ImpactsEnums now decode frequencies lazily like PostingsEnums.
(Adrien Grand)
Changes in runtime behavior
---------------------

View File

@ -1143,7 +1143,7 @@ public final class Lucene90PostingsReader extends PostingsReaderBase {
if (left >= BLOCK_SIZE) {
pforUtil.decodeAndPrefixSum(docIn, accum, docBuffer);
if (indexHasFreqs) {
pforUtil.decode(docIn, freqBuffer);
isFreqsRead = false;
}
blockUpto += BLOCK_SIZE;
} else {