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
This commit is contained in:
David Wayne Smiley 2014-06-30 20:09:56 +00:00
parent 3fb008e7f0
commit 7df563e409
2 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ import org.apache.lucene.spatial.query.UnsupportedSpatialOperation;
* <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 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;

View File

@ -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);