Skip to content

Commit ba9ab0c

Browse files
committed
rename variable and add comment
1 parent 841e7bb commit ba9ab0c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,21 +484,23 @@ private static void parseSegmentInfos(
484484
input);
485485
}
486486

487-
int segmentDerivedFromMajorVersion =
487+
int createdOrSegmentMinVersion =
488488
info.getMinVersion() == null
489489
? infos.indexCreatedVersionMajor
490490
: info.getMinVersion().major;
491+
492+
// version >=7 are expected to record minVersion
491493
if (info.getMinVersion() == null || info.getMinVersion().major < minSupportedMajorVersion) {
492494
throw new IndexFormatTooOldException(
493495
input,
494496
"Index has segments derived from Lucene version "
495-
+ segmentDerivedFromMajorVersion
497+
+ createdOrSegmentMinVersion
496498
+ ".x and is not supported by Lucene "
497499
+ Version.LATEST
498500
+ ". This Lucene version only supports indexes with major version "
499501
+ minSupportedMajorVersion
500502
+ " or later (found: "
501-
+ segmentDerivedFromMajorVersion
503+
+ createdOrSegmentMinVersion
502504
+ ", minimum supported: "
503505
+ minSupportedMajorVersion
504506
+ "). To resolve this issue re-index your data using Lucene "

0 commit comments

Comments
 (0)