diff --git a/src/main/java/org/elasticsearch/index/query/GeoShapeFilterParser.java b/src/main/java/org/elasticsearch/index/query/GeoShapeFilterParser.java index f538094240c..210368f4fe9 100644 --- a/src/main/java/org/elasticsearch/index/query/GeoShapeFilterParser.java +++ b/src/main/java/org/elasticsearch/index/query/GeoShapeFilterParser.java @@ -111,9 +111,6 @@ public class GeoShapeFilterParser implements FilterParser { if (shapeRelation == null) { throw new QueryParsingException(parseContext.index(), "Unknown shape operation [" + parser.text() + "]"); } - if (shapeRelation != ShapeRelation.INTERSECTS) { - throw new QueryParsingException(parseContext.index(), String.format("Unsupported shape operation [%s]. Only [%s] operation is supported", parser.text(), ShapeRelation.INTERSECTS.getRelationName())); - } } else if ("strategy".equals(currentFieldName)) { strategyName = parser.text(); } else if ("indexed_shape".equals(currentFieldName) || "indexedShape".equals(currentFieldName)) { diff --git a/src/main/java/org/elasticsearch/index/query/GeoShapeQueryParser.java b/src/main/java/org/elasticsearch/index/query/GeoShapeQueryParser.java index facf65ea4d3..25ec5643d18 100644 --- a/src/main/java/org/elasticsearch/index/query/GeoShapeQueryParser.java +++ b/src/main/java/org/elasticsearch/index/query/GeoShapeQueryParser.java @@ -91,9 +91,6 @@ public class GeoShapeQueryParser implements QueryParser { if (shapeRelation == null) { throw new QueryParsingException(parseContext.index(), "Unknown shape operation [" + parser.text() + " ]"); } - if (shapeRelation != ShapeRelation.INTERSECTS) { - throw new QueryParsingException(parseContext.index(), String.format("Unsupported shape operation [%s]. Only [%s] operation is supported", parser.text(), ShapeRelation.INTERSECTS.getRelationName())); - } } else if ("indexed_shape".equals(currentFieldName) || "indexedShape".equals(currentFieldName)) { while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { diff --git a/src/test/java/org/elasticsearch/test/integration/search/geo/GeoFilterTests.java b/src/test/java/org/elasticsearch/test/integration/search/geo/GeoFilterTests.java index 00776b8fff3..a9e5bf364af 100644 --- a/src/test/java/org/elasticsearch/test/integration/search/geo/GeoFilterTests.java +++ b/src/test/java/org/elasticsearch/test/integration/search/geo/GeoFilterTests.java @@ -233,11 +233,9 @@ public class GeoFilterTests extends AbstractNodesTests { public void testShapeRelations() throws Exception { assert intersectSupport: "Intersect relation is not supported"; -// assert disjointSupport: "Disjoint relation is not supported"; -// assert withinSupport: "within relation is not supported"; + assert disjointSupport: "Disjoint relation is not supported"; + assert withinSupport: "within relation is not supported"; - assert !disjointSupport: "Disjoint relation is now supported"; - assert !withinSupport: "within relation is now supported"; String mapping = XContentFactory.jsonBuilder() .startObject()