Skip to content

Commit e7f9bc8

Browse files
authored
Align comments with upgraded postings format (#14368)
1 parent a2c6d3a commit e7f9bc8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene912/Lucene912PostingsReader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,9 +1770,8 @@ private static void prefetchPostings(IndexInput docIn, IntBlockTermState state)
17701770
if (docIn.getFilePointer() != state.docStartFP) {
17711771
// Don't prefetch if the input is already positioned at the right offset, which suggests that
17721772
// the caller is streaming the entire inverted index (e.g. for merging), let the read-ahead
1773-
// logic do its work instead. Note that this heuristic doesn't work for terms that have skip
1774-
// data, since skip data is stored after the last term, but handling all terms that have <128
1775-
// docs is a good start already.
1773+
// logic do its work instead. Note that this heuristic also handles terms with skip data
1774+
// starting in version 912, where skip data was directly inlined into postings lists.
17761775
docIn.prefetch(state.docStartFP, 1);
17771776
}
17781777
// Note: we don't prefetch positions or offsets, which are less likely to be needed.

lucene/core/src/java/org/apache/lucene/codecs/lucene101/Lucene101PostingsReader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,8 @@ private static void prefetchPostings(IndexInput docIn, IntBlockTermState state)
13581358
if (docIn.getFilePointer() != state.docStartFP) {
13591359
// Don't prefetch if the input is already positioned at the right offset, which suggests that
13601360
// the caller is streaming the entire inverted index (e.g. for merging), let the read-ahead
1361-
// logic do its work instead. Note that this heuristic doesn't work for terms that have skip
1362-
// data, since skip data is stored after the last term, but handling all terms that have <128
1363-
// docs is a good start already.
1361+
// logic do its work instead. Note that this heuristic also handles terms with skip data
1362+
// starting in version 912, where skip data was directly inlined into postings lists.
13641363
docIn.prefetch(state.docStartFP, 1);
13651364
}
13661365
// Note: we don't prefetch positions or offsets, which are less likely to be needed.

0 commit comments

Comments
 (0)