Field fieldName does not support GeoShapeType MULTIPOINT queries – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-6.8

Briefly, this error occurs when you try to execute a GeoShapeType.MULTIPOINT query on a field that doesn’t support this type of query. This could be due to the field not being mapped as a geo_shape type. To resolve this issue, you can either change the query type to match the field type or reindex your data with the correct mapping. Ensure that the field you’re querying is indeed a geo_shape type field. If it’s not, you may need to create a new field with the correct type or change the existing field’s type.

This guide will help you check for common problems that cause the log ” Field [” + fieldName + “] does not support ” + GeoShapeType.MULTIPOINT + ” queries ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, query.

Log Context

Log “Field [” + fieldName + “] does not support ” + GeoShapeType.MULTIPOINT + ” queries” class name is GeoShapeQueryBuilder.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 r.minLat; r.maxLat; r.minLon; r.maxLon);
 } else if (queryShape instanceof double[][]) {
 // note: we decompose point queries into a bounding box query with min values == max values
 // to do this for multipoint we would have to create a BooleanQuery for each point
 // this is *way* too costly. So we do not allow multipoint queries
 throw new QueryShardException(context; "Field [" + fieldName + "] does not support " + GeoShapeType.MULTIPOINT + " queries");
 } else if (queryShape instanceof double[] || queryShape instanceof GeoPoint) {
 // for now just create a single bounding box query with min values == max values
 double[] pt;
 if (queryShape instanceof GeoPoint) {
 pt = new double[] {((GeoPoint)queryShape).lon(); ((GeoPoint)queryShape).lat()};

 

 [ratemypost]