Briefly, this error occurs when you try to use a field in Elasticsearch for an operation that it doesn’t support. For example, you might be trying to use a text field for a numerical operation. To resolve this issue, you should first check the field type in your mapping. If the field type is incorrect, you need to change it to the correct one. If the field type is correct, then you should check the operation you’re trying to perform and ensure it’s compatible with the field type.
This guide will help you check for common problems that cause the log ” field [{}] is supported for [{}] only ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .
Log Context
Log “field [{}] is supported for [{}] only” class name is GeoJsonParser.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
} else if (coordinateNode == null && GeoShapeType.GEOMETRYCOLLECTION != shapeType) { throw new ElasticsearchParseException("coordinates not included"); } else if (geometryCollections == null && GeoShapeType.GEOMETRYCOLLECTION == shapeType) { throw new ElasticsearchParseException("geometries not included"); } else if (radius != null && GeoShapeType.CIRCLE != shapeType) { throw new ElasticsearchParseException("field [{}] is supported for [{}] only"; CircleBuilder.FIELD_RADIUS; CircleBuilder.TYPE); } if (shapeType.equals(GeoShapeType.GEOMETRYCOLLECTION)) { return geometryCollections; }
[ratemypost]