diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index 580faef710d6..6eea3e5a78d1 100644 --- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -1382,7 +1382,7 @@ public void testUpgradeWithExplicitUpgrades() throws Exception { assertFalse("Excpected these segments to be an old version", versionBefore.equals(Version.LATEST)); - LiveUpgradeIndexMergePolicy uimp = new LiveUpgradeIndexMergePolicy(NoMergePolicy.INSTANCE); + LiveUpgradeSegmentsMergePolicy uimp = new LiveUpgradeSegmentsMergePolicy(NoMergePolicy.INSTANCE); assertEquals(numSegmentsBefore, checkAllSegmentsUpgraded(dir, versionBefore, createdVersionBefore)); diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java b/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java index 830f695a0588..67c07076fca5 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java @@ -203,7 +203,7 @@ public void upgrade(int maxSegements) throws IOException { MergePolicy mp; if(includeNewSegments) { - LiveUpgradeIndexMergePolicy uimp = new LiveUpgradeIndexMergePolicy(iwc.getMergePolicy()); + LiveUpgradeSegmentsMergePolicy uimp = new LiveUpgradeSegmentsMergePolicy(iwc.getMergePolicy()); uimp.setEnableUpgrades(true); mp = uimp; } else { diff --git a/lucene/core/src/java/org/apache/lucene/index/LiveUpgradeIndexMergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/LiveUpgradeSegmentsMergePolicy.java similarity index 97% rename from lucene/core/src/java/org/apache/lucene/index/LiveUpgradeIndexMergePolicy.java rename to lucene/core/src/java/org/apache/lucene/index/LiveUpgradeSegmentsMergePolicy.java index 3d78bf792023..216049f63634 100644 --- a/lucene/core/src/java/org/apache/lucene/index/LiveUpgradeIndexMergePolicy.java +++ b/lucene/core/src/java/org/apache/lucene/index/LiveUpgradeSegmentsMergePolicy.java @@ -55,15 +55,15 @@ * @lucene.experimental * @see IndexUpgrader */ -public class LiveUpgradeIndexMergePolicy extends MergePolicyWrapper { +public class LiveUpgradeSegmentsMergePolicy extends MergePolicyWrapper { private int maxUpgradesAtATime = 5; private volatile boolean enableUpgrades = false; - private Predicate shouldSegmentUpgrade = LiveUpgradeIndexMergePolicy::segmentIsLatestVersion; + private Predicate shouldSegmentUpgrade = LiveUpgradeSegmentsMergePolicy::segmentIsLatestVersion; /** Wrap the given {@link MergePolicy} and intercept forceMerge requests to * only upgrade segments written with previous Lucene versions. */ - public LiveUpgradeIndexMergePolicy(MergePolicy in) { + public LiveUpgradeSegmentsMergePolicy(MergePolicy in) { super(in); }