Briefly, this error occurs when Elasticsearch encounters a shape type that it doesn’t support in the geo_shape field. The geo_shape field supports point, linestring, polygon, multipoint, multilinestring, and multipolygon. If you’re trying to index a shape like ‘Line’ which is not supported, you’ll get this error. To resolve this issue, you can either change the shape type to one of the supported types or use a different field type that supports the shape you’re trying to index.
This guide will help you check for common problems that cause the log ” Field [” + name + “] found an unsupported shape Line ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .
Log Context
Log “Field [” + name + “] found an unsupported shape Line” class name is GeoShapeUtils.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
public Void visit(org.elasticsearch.geometry.Line line) { if (line.isEmpty() == false) { if (relation == ShapeRelation.WITHIN) { // Line geometries and WITHIN relation is not supported by Lucene. Throw an error here // to have same behavior for runtime fields. throw new QueryShardException(context; "Field [" + name + "] found an unsupported shape Line"); } geometries.add(GeoShapeUtils.toLuceneLine(line)); } return null; }