From 7df563e4098aa527afb5c1385180f71a409de250 Mon Sep 17 00:00:00 2001 From: David Wayne Smiley Date: Mon, 30 Jun 2014 20:09:56 +0000 Subject: [PATCH] LUCENE-5771: Remove BBoxStrategy's support for Overlaps because it never actually did work. This is a partial commit for this issue -- just the BBox portion so as not to interfere with LUCENE-5779. Trunk only (bbox isn't in 4x yet). git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1606905 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/spatial/bbox/BBoxStrategy.java | 5 ++--- .../org/apache/lucene/spatial/bbox/TestBBoxStrategy.java | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java b/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java index f5fa9e512c5..16cd656d40c 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java @@ -53,7 +53,7 @@ import org.apache.lucene.spatial.query.UnsupportedSpatialOperation; * * @@ -186,8 +186,7 @@ public class BBoxStrategy extends SpatialStrategy { else if( op == SpatialOperation.IsEqualTo ) spatial = makeEquals(bbox); else if( op == SpatialOperation.IsDisjointTo ) spatial = makeDisjoint(bbox); else if( op == SpatialOperation.IsWithin ) spatial = makeWithin(bbox); - else if( op == SpatialOperation.Overlaps ) spatial = makeIntersects(bbox); - else { + else { //no Overlaps support yet throw new UnsupportedSpatialOperation(op); } return spatial; diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java b/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java index 6e2ef3478ba..23e0191b815 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java @@ -22,6 +22,7 @@ import com.spatial4j.core.shape.Shape; import org.apache.lucene.spatial.SpatialMatchConcern; import org.apache.lucene.spatial.StrategyTestCase; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import java.io.IOException; @@ -42,7 +43,7 @@ public class TestBBoxStrategy extends StrategyTestCase { return shape.getBoundingBox(); } - @Test + @Test @Ignore("Overlaps not supported") public void testBasicOperaions() throws IOException { getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX);