You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2014/06/30 22:09:56 UTC
svn commit: r1606905 - in /lucene/dev/trunk/lucene/spatial/src:
java/org/apache/lucene/spatial/bbox/BBoxStrategy.java
test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
Author: dsmiley
Date: Mon Jun 30 20:09:56 2014
New Revision: 1606905
URL: http://svn.apache.org/r1606905
Log:
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).
Modified:
lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java
lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
Modified: lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java?rev=1606905&r1=1606904&r2=1606905&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java (original)
+++ lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java Mon Jun 30 20:09:56 2014
@@ -53,7 +53,7 @@ import org.apache.lucene.spatial.query.U
* <ul>
* <li>Only indexes Rectangles; just one per field value.</li>
* <li>Can query only by a Rectangle.</li>
- * <li>Supports all {@link SpatialOperation}s.</li>
+ * <li>Supports most {@link SpatialOperation}s -- not Overlaps.</li>
* <li>Uses the DocValues API for any sorting / relevancy.</li>
* </ul>
*
@@ -186,8 +186,7 @@ public class BBoxStrategy extends Spatia
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;
Modified: lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java?rev=1606905&r1=1606904&r2=1606905&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java (original)
+++ lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java Mon Jun 30 20:09:56 2014
@@ -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 St
return shape.getBoundingBox();
}
- @Test
+ @Test @Ignore("Overlaps not supported")
public void testBasicOperaions() throws IOException {
getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX);