diff --git a/core/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java index 0424cf6f14b..0f9006ed7da 100644 --- a/core/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/GeoShapeQueryBuilder.java @@ -341,11 +341,9 @@ public class GeoShapeQueryBuilder extends AbstractQueryBuilder queryBuilder.toQuery(createShardContext())); + assertThat(e.getMessage(), containsString("Field [mapped_string] is not of type [geo_shape] but of type [text]")); + } + public void testSerializationFailsUnlessFetched() throws IOException { QueryBuilder builder = doCreateTestQueryBuilder(true); QueryBuilder queryBuilder = Rewriteable.rewrite(builder, createShardContext());