Skip to content

Commit 8b0af43

Browse files
committed
use IndexVersions.MINIMUM_READONLY_COMPATIBLE
1 parent c98ae18 commit 8b0af43

File tree

1 file changed

+1
-4
lines changed
  • server/src/main/java/org/elasticsearch/common/lucene

1 file changed

+1
-4
lines changed

server/src/main/java/org/elasticsearch/common/lucene/Lucene.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@
9090

9191
public class Lucene {
9292

93-
// Support for reading N-2
94-
public static final int MIN_SUPPORTED_MAJOR = Version.LATEST.major - 2;
95-
9693
public static final String LATEST_CODEC = "Lucene101";
9794

9895
public static final String SOFT_DELETES_FIELD = "__soft_deletes";
@@ -157,7 +154,7 @@ public static SegmentInfos readSegmentInfos(IndexCommit commit) throws IOExcepti
157154
* Reads the segments infos from the given segments file name, failing if it fails to load
158155
*/
159156
private static SegmentInfos readSegmentInfos(String segmentsFileName, Directory directory) throws IOException {
160-
return SegmentInfos.readCommit(directory, segmentsFileName, MIN_SUPPORTED_MAJOR);
157+
return SegmentInfos.readCommit(directory, segmentsFileName, IndexVersions.MINIMUM_READONLY_COMPATIBLE.luceneVersion().major);
161158
}
162159

163160
/**

0 commit comments

Comments
 (0)