lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [37/46] lucene-solr:jira/solr-11833: LUCENE-8248: MergePolicyWrapper is renamed to FilterMergePolicy and now also overrides getMaxCFSSegmentSizeMB
Date Mon, 16 Apr 2018 17:21:17 GMT
LUCENE-8248: MergePolicyWrapper is renamed to FilterMergePolicy and now also overrides getMaxCFSSegmentSizeMB


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7c0387ad
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7c0387ad
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7c0387ad

Branch: refs/heads/jira/solr-11833
Commit: 7c0387ad3fa7985564350a0cd16694905e66619d
Parents: 487daab
Author: Mike McCandless <mikemccand@apache.org>
Authored: Fri Apr 13 15:45:19 2018 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Fri Apr 13 15:45:19 2018 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |   3 +
 .../apache/lucene/index/FilterMergePolicy.java  | 106 +++++++++++++++++++
 .../org/apache/lucene/index/MergePolicy.java    |   2 +-
 .../apache/lucene/index/MergePolicyWrapper.java |  67 ++----------
 .../org/apache/lucene/index/NoMergePolicy.java  |  11 +-
 .../index/OneMergeWrappingMergePolicy.java      |   2 +-
 .../lucene/index/UpgradeIndexMergePolicy.java   |   2 +-
 .../index/TestDemoParallelLeafReader.java       |   2 +-
 .../lucene/index/TestFilterMergePolicy.java     |  37 +++++++
 .../apache/lucene/index/TestIndexWriter.java    |   2 +-
 .../lucene/index/TestIndexWriterOnDiskFull.java |   2 +-
 .../lucene/index/TestMergePolicyWrapper.java    |  37 -------
 .../apache/lucene/index/TestMultiFields.java    |   2 +-
 .../apache/lucene/index/ForceMergePolicy.java   |   2 +-
 .../apache/solr/index/SortingMergePolicy.java   |   4 +-
 .../org/apache/solr/util/RandomMergePolicy.java |   4 +-
 16 files changed, 172 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 58d234f..e559099 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -104,6 +104,9 @@ API Changes
   Instead use IndexSearcher.createWeight(), rewriting the query first.
   (Alan Woodward)
 
+* LUCENE-8248: MergePolicyWrapper is renamed to FilterMergePolicy and now
+  also overrides getMaxCFSSegmentSizeMB (Mike Sokolov via Mike McCandless)
+
 New Features
 
 * LUCENE-8200: Allow doc-values to be updated atomically together

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/FilterMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/FilterMergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/FilterMergePolicy.java
new file mode 100644
index 0000000..d073b84
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/index/FilterMergePolicy.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.index;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.lucene.util.IOSupplier;
+
+/**
+ * A wrapper for {@link MergePolicy} instances.
+ *
+ * @lucene.experimental
+ */
+public class FilterMergePolicy extends MergePolicy {
+
+  /** The wrapped {@link MergePolicy}. */
+  protected final MergePolicy in;
+
+  /**
+   * Creates a new filter merge policy instance wrapping another.
+   *
+   * @param in the wrapped {@link MergePolicy}
+   */
+  public FilterMergePolicy(MergePolicy in) {
+    this.in = in;
+  }
+
+  @Override
+  public MergeSpecification findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos,
IndexWriter writer)
+      throws IOException {
+    return in.findMerges(mergeTrigger, segmentInfos, writer);
+  }
+
+  @Override
+  public MergeSpecification findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount,
+      Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer) throws IOException
{
+    return in.findForcedMerges(segmentInfos, maxSegmentCount, segmentsToMerge, writer);
+  }
+
+  @Override
+  public MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter
writer) throws IOException {
+    return in.findForcedDeletesMerges(segmentInfos, writer);
+  }
+
+  @Override
+  public boolean useCompoundFile(SegmentInfos infos, SegmentCommitInfo mergedInfo, IndexWriter
writer)
+      throws IOException {
+    return in.useCompoundFile(infos, mergedInfo, writer);
+  }
+
+  @Override
+  protected long size(SegmentCommitInfo info, IndexWriter writer) throws IOException {
+    return in.size(info, writer);
+  }
+
+  @Override
+  public double getNoCFSRatio() {
+    return in.getNoCFSRatio();
+  }
+
+  @Override
+  public final void setNoCFSRatio(double noCFSRatio) {
+    in.setNoCFSRatio(noCFSRatio);
+  }
+
+  @Override
+  public final void setMaxCFSSegmentSizeMB(double v) {
+    in.setMaxCFSSegmentSizeMB(v);
+  }
+
+  @Override
+  public final double getMaxCFSSegmentSizeMB() {
+    return in.getMaxCFSSegmentSizeMB();
+  }
+
+  @Override
+  public String toString() {
+    return getClass().getSimpleName() + "(" + in + ")";
+  }
+
+  @Override
+  public boolean keepFullyDeletedSegment(CodecReader reader) throws IOException {
+    return in.keepFullyDeletedSegment(reader);
+  }
+
+  @Override
+  public int numDeletesToMerge(SegmentCommitInfo info, int pendingDeleteCount,
+                               IOSupplier<CodecReader> readerSupplier) throws IOException
{
+    return in.numDeletesToMerge(info, pendingDeleteCount, readerSupplier);
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
index 8212c4a..093fe5a 100644
--- a/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
@@ -590,7 +590,7 @@ public abstract class MergePolicy {
   }
 
   /** Returns the largest size allowed for a compound file segment */
-  public final double getMaxCFSSegmentSizeMB() {
+  public double getMaxCFSSegmentSizeMB() {
     return maxCFSSegmentSize/1024/1024.;
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/MergePolicyWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/MergePolicyWrapper.java b/lucene/core/src/java/org/apache/lucene/index/MergePolicyWrapper.java
index c7124ad..4731e5e 100644
--- a/lucene/core/src/java/org/apache/lucene/index/MergePolicyWrapper.java
+++ b/lucene/core/src/java/org/apache/lucene/index/MergePolicyWrapper.java
@@ -17,80 +17,25 @@
 package org.apache.lucene.index;
 
 import java.io.IOException;
-import java.util.Map;
 
 import org.apache.lucene.util.IOSupplier;
 
 /**
  * A wrapper for {@link MergePolicy} instances.
- *
+ * @deprecated replace with FilterMergePolicy
  * @lucene.experimental
  */
-public class MergePolicyWrapper extends MergePolicy {
-
-  /** The wrapped {@link MergePolicy}. */
-  protected final MergePolicy in;
+@Deprecated
+public class MergePolicyWrapper extends FilterMergePolicy {
+  // placeholder for backwards compatibility
 
   /**
-   * Creates a new merge policy instance.
+   * Creates a new merge policy instance wrapping another.
    *
    * @param in the wrapped {@link MergePolicy}
    */
   public MergePolicyWrapper(MergePolicy in) {
-    this.in = in;
-  }
-
-  @Override
-  public MergeSpecification findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos,
IndexWriter writer)
-      throws IOException {
-    return in.findMerges(mergeTrigger, segmentInfos, writer);
-  }
-
-  @Override
-  public MergeSpecification findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount,
-      Map<SegmentCommitInfo,Boolean> segmentsToMerge, IndexWriter writer) throws IOException
{
-    return in.findForcedMerges(segmentInfos, maxSegmentCount, segmentsToMerge, writer);
-  }
-
-  @Override
-  public MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos, IndexWriter
writer) throws IOException {
-    return in.findForcedDeletesMerges(segmentInfos, writer);
-  }
-
-  @Override
-  public boolean useCompoundFile(SegmentInfos infos, SegmentCommitInfo mergedInfo, IndexWriter
writer)
-      throws IOException {
-    return in.useCompoundFile(infos, mergedInfo, writer);
-  }
-
-  @Override
-  protected long size(SegmentCommitInfo info, IndexWriter writer) throws IOException {
-    return in.size(info, writer);
-  }
-
-  @Override
-  public double getNoCFSRatio() {
-    return in.getNoCFSRatio();
-  }
-
-  @Override
-  public final void setNoCFSRatio(double noCFSRatio) {
-    in.setNoCFSRatio(noCFSRatio);
-  }
-
-  @Override
-  public final void setMaxCFSSegmentSizeMB(double v) {
-    in.setMaxCFSSegmentSizeMB(v);
-  }
-
-  @Override
-  public String toString() {
-    return getClass().getSimpleName() + "(" + in + ")";
-  }
-
-  @Override
-  public boolean keepFullyDeletedSegment(CodecReader reader) throws IOException {
-    return in.keepFullyDeletedSegment(reader);
+    super(in);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/NoMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/NoMergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/NoMergePolicy.java
index 08f900a..e1f1a54 100644
--- a/lucene/core/src/java/org/apache/lucene/index/NoMergePolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/index/NoMergePolicy.java
@@ -54,17 +54,22 @@ public final class NoMergePolicy extends MergePolicy {
   protected long size(SegmentCommitInfo info, IndexWriter writer) throws IOException {
     return Long.MAX_VALUE;
   }
-  
+
   @Override
   public double getNoCFSRatio() {
     return super.getNoCFSRatio();
   }
-  
+
+  @Override
+  public double getMaxCFSSegmentSizeMB() {
+    return super.getMaxCFSSegmentSizeMB();
+  }
+
   @Override
   public void setMaxCFSSegmentSizeMB(double v) {
     super.setMaxCFSSegmentSizeMB(v);
   }
-  
+
   @Override
   public void setNoCFSRatio(double noCFSRatio) {
     super.setNoCFSRatio(noCFSRatio);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/OneMergeWrappingMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/OneMergeWrappingMergePolicy.java
b/lucene/core/src/java/org/apache/lucene/index/OneMergeWrappingMergePolicy.java
index 982e8c2..300c3fb 100644
--- a/lucene/core/src/java/org/apache/lucene/index/OneMergeWrappingMergePolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/index/OneMergeWrappingMergePolicy.java
@@ -26,7 +26,7 @@ import java.util.function.UnaryOperator;
  *
  * @lucene.experimental
  */
-public class OneMergeWrappingMergePolicy extends MergePolicyWrapper {
+public class OneMergeWrappingMergePolicy extends FilterMergePolicy {
 
   private final UnaryOperator<OneMerge> wrapOneMerge;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java
index 74cbc90..a8a0aed 100644
--- a/lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/index/UpgradeIndexMergePolicy.java
@@ -48,7 +48,7 @@ import java.util.HashMap;
   * @lucene.experimental
   * @see IndexUpgrader
   */
-public class UpgradeIndexMergePolicy extends MergePolicyWrapper {
+public class UpgradeIndexMergePolicy extends FilterMergePolicy {
 
   /** Wrap the given {@link MergePolicy} and intercept forceMerge requests to
    * only upgrade segments written with previous Lucene versions. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestDemoParallelLeafReader.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestDemoParallelLeafReader.java
b/lucene/core/src/test/org/apache/lucene/index/TestDemoParallelLeafReader.java
index ae06ae7..415dd90 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestDemoParallelLeafReader.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestDemoParallelLeafReader.java
@@ -508,7 +508,7 @@ public class TestDemoParallelLeafReader extends LuceneTestCase {
     }
 
     /** Just replaces the sub-readers with parallel readers, so reindexed fields are merged
into new segments. */
-    private class ReindexingMergePolicy extends MergePolicyWrapper {
+    private class ReindexingMergePolicy extends FilterMergePolicy {
 
       class ReindexingOneMerge extends OneMerge {
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestFilterMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestFilterMergePolicy.java b/lucene/core/src/test/org/apache/lucene/index/TestFilterMergePolicy.java
new file mode 100644
index 0000000..4057d3c
--- /dev/null
+++ b/lucene/core/src/test/org/apache/lucene/index/TestFilterMergePolicy.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.index;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestFilterMergePolicy extends LuceneTestCase {
+
+  public void testMethodsOverridden() throws Exception {
+    for (Method m : MergePolicy.class.getDeclaredMethods()) {
+      if (Modifier.isFinal(m.getModifiers())) continue;
+      try {
+        FilterMergePolicy.class.getDeclaredMethod(m.getName(),  m.getParameterTypes());
+      } catch (NoSuchMethodException e) {
+        fail("MergePolicyWrapper needs to override '" + m + "'");
+      }
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
index e45716d..12151e7 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
@@ -2222,7 +2222,7 @@ public class TestIndexWriter extends LuceneTestCase {
     Directory dir = newDirectory();
     IndexWriterConfig iwc = newIndexWriterConfig(new MockAnalyzer(random()));
     AtomicBoolean keepFullyDeletedSegments = new AtomicBoolean();
-    iwc.setMergePolicy(new MergePolicyWrapper(iwc.getMergePolicy()) {
+    iwc.setMergePolicy(new FilterMergePolicy(iwc.getMergePolicy()) {
       @Override
       public boolean keepFullyDeletedSegment(CodecReader reader) throws IOException {
         return keepFullyDeletedSegments.get();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
index d9e73a1..ce3c72c 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
@@ -501,7 +501,7 @@ public class TestIndexWriterOnDiskFull extends LuceneTestCase {
         newIndexWriterConfig(new MockAnalyzer(random()))
           .setMergeScheduler(new SerialMergeScheduler())
           .setReaderPooling(true)
-          .setMergePolicy(new MergePolicyWrapper(newLogMergePolicy(2)) {
+          .setMergePolicy(new FilterMergePolicy(newLogMergePolicy(2)) {
             @Override
             public boolean keepFullyDeletedSegment(CodecReader reader) throws IOException
{
               // we can do this because we add/delete/add (and dont merge to "nothing")

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestMergePolicyWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestMergePolicyWrapper.java b/lucene/core/src/test/org/apache/lucene/index/TestMergePolicyWrapper.java
deleted file mode 100644
index fa1b5d4..0000000
--- a/lucene/core/src/test/org/apache/lucene/index/TestMergePolicyWrapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.lucene.index;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-import org.apache.lucene.util.LuceneTestCase;
-
-public class TestMergePolicyWrapper extends LuceneTestCase {
-
-  public void testMethodsOverridden() throws Exception {
-    for (Method m : MergePolicy.class.getDeclaredMethods()) {
-      if (Modifier.isFinal(m.getModifiers())) continue;
-      try {
-        MergePolicyWrapper.class.getDeclaredMethod(m.getName(),  m.getParameterTypes());
-      } catch (NoSuchMethodException e) {
-        fail("MergePolicyWrapper needs to override '" + m + "'");
-      }
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java b/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
index 6e0d643..3c09bbd 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
@@ -49,7 +49,7 @@ public class TestMultiFields extends LuceneTestCase {
       Directory dir = newDirectory();
 
       IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random()))
-                                             .setMergePolicy(new MergePolicyWrapper(NoMergePolicy.INSTANCE)
{
+                                             .setMergePolicy(new FilterMergePolicy(NoMergePolicy.INSTANCE)
{
                                                @Override
                                                public boolean keepFullyDeletedSegment(CodecReader
reader) {
                                                  // we can do this because we use NoMergePolicy
(and dont merge to "nothing")

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/lucene/test-framework/src/java/org/apache/lucene/index/ForceMergePolicy.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/ForceMergePolicy.java
b/lucene/test-framework/src/java/org/apache/lucene/index/ForceMergePolicy.java
index 02382e8..45aaa02 100755
--- a/lucene/test-framework/src/java/org/apache/lucene/index/ForceMergePolicy.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/ForceMergePolicy.java
@@ -30,7 +30,7 @@ import org.apache.lucene.index.SegmentInfos;
  *
  * @lucene.experimental
  */
-public final class ForceMergePolicy extends MergePolicyWrapper {
+public final class ForceMergePolicy extends FilterMergePolicy {
 
   /** Create a new {@code ForceMergePolicy} around the given {@code MergePolicy} */
   public ForceMergePolicy(MergePolicy in) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java b/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java
index 313b662..c3e5f5e 100644
--- a/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java
+++ b/solr/core/src/java/org/apache/solr/index/SortingMergePolicy.java
@@ -16,13 +16,13 @@
  */
 package org.apache.solr.index;
 
+import org.apache.lucene.index.FilterMergePolicy;
 import org.apache.lucene.index.MergePolicy;
-import org.apache.lucene.index.MergePolicyWrapper;
 import org.apache.lucene.search.Sort;
 
 // TODO: remove this and add indexSort specification directly to solrconfig.xml?  But for
BWC, also accept SortingMergePolicy specifiction?
 
-public final class SortingMergePolicy extends MergePolicyWrapper {
+public final class SortingMergePolicy extends FilterMergePolicy {
 
   private final Sort sort;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7c0387ad/solr/test-framework/src/java/org/apache/solr/util/RandomMergePolicy.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/RandomMergePolicy.java b/solr/test-framework/src/java/org/apache/solr/util/RandomMergePolicy.java
index b556fce..b930a4f 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/RandomMergePolicy.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/RandomMergePolicy.java
@@ -18,7 +18,7 @@ package org.apache.solr.util;
 
 import java.lang.invoke.MethodHandles;
 import org.apache.lucene.index.MergePolicy;
-import org.apache.lucene.index.MergePolicyWrapper;
+import org.apache.lucene.index.FilterMergePolicy;
 import org.apache.lucene.util.LuceneTestCase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
  * Solr tests utilizing the Lucene randomized test framework can refer 
  * to this class in solrconfig.xml to get a fully randomized merge policy.
  */
-public class RandomMergePolicy extends MergePolicyWrapper {
+public class RandomMergePolicy extends FilterMergePolicy {
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   


Mime
View raw message