版本: 7.12-8.2
简而言之,当 Elasticsearch 在 geo_shape 字段中遇到不支持的形状类型时,就会发生此错误。geo_shape 字段支持 point(点)、linestring(线串)、polygon(多边形)、multipoint(多点)、multilinestring(多线串)和 multipolygon(多多边形)。如果您尝试索引像 ‘Line’ 这样不支持的形状,就会收到此错误。要解决此问题,您可以将形状类型更改为支持的类型之一,或者使用支持您尝试索引的形状的其他字段类型。
日志上下文 #
日志 “Field [” + name + “] found an unsupported shape Line” 的类名是 GeoShapeUtils.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:
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;
}





