diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index a4484bb8ea0..74cbcd8fa17 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -1,4 +1,3 @@ - Lucene Change Log For more information on past and future Lucene versions, please see: @@ -84,6 +83,9 @@ API Changes takes the same selectors. Add helper methods to DocValues.java that are better suited for search code (never return null, etc). (Mike McCandless, Robert Muir) +* LUCENE-5692: DisjointSpatialFilter is deprecated and RecursivePrefixTreeStrategy + no longer supports this predicate. (David Smiley) + Documentation * LUCENE-5392: Add/improve analysis package documentation to reflect diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/DisjointSpatialFilter.java b/lucene/spatial/src/java/org/apache/lucene/spatial/DisjointSpatialFilter.java index 6dc8e7a06ec..3d21b75b757 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/DisjointSpatialFilter.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/DisjointSpatialFilter.java @@ -38,7 +38,10 @@ import java.io.IOException; * a way to invert a query shape. * * @lucene.experimental + * + * @deprecated See https://issues.apache.org/jira/browse/LUCENE-5692 */ +@Deprecated public class DisjointSpatialFilter extends Filter { private final String field;//maybe null diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java index 4e464b946f3..13fed4a391d 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/RecursivePrefixTreeStrategy.java @@ -21,7 +21,6 @@ import com.spatial4j.core.shape.Point; import com.spatial4j.core.shape.Shape; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.search.Filter; -import org.apache.lucene.spatial.DisjointSpatialFilter; import org.apache.lucene.spatial.prefix.tree.Cell; import org.apache.lucene.spatial.prefix.tree.CellIterator; import org.apache.lucene.spatial.prefix.tree.LegacyCell; @@ -165,8 +164,6 @@ public class RecursivePrefixTreeStrategy extends PrefixTreeStrategy { @Override public Filter makeFilter(SpatialArgs args) { final SpatialOperation op = args.getOperation(); - if (op == SpatialOperation.IsDisjointTo) - return new DisjointSpatialFilter(this, args, getFieldName()); Shape shape = args.getShape(); int detailLevel = grid.getLevelForDistance(args.resolveDistErr(ctx, distErrPct)); diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java b/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java index e760bda17f6..37b24574dc6 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java @@ -148,13 +148,6 @@ public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase { doTest(SpatialOperation.Contains); } - @Test - @Repeat(iterations = ITERATIONS) - public void testDisjoint() throws IOException { - setupGrid(-1); - doTest(SpatialOperation.IsDisjointTo); - } - /** See LUCENE-5062, {@link ContainsPrefixTreeFilter#multiOverlappingIndexedShapes}. */ @Test public void testContainsPairOverlap() throws IOException {