版本: 6.8-8.9
简而言之,当Elasticsearch尝试索引包含shape字段的文档时,如果未指定shape类型,就会发生此错误。这对于Elasticsearch理解shape的几何形状是必需的。要解决此问题,您可以在映射中指定shape类型,或者在要索引的文档中包含它。例如,如果您正在索引多边形,应该在文档中包含"type": “polygon”。或者,您可以在创建索引时在映射中指定shape类型。
日志上下文 #
“shape type not included"日志的类名是 GeoJsonParser.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
} if (malformedException != null) {
throw new ElasticsearchParseException(malformedException);
} else if (shapeType == null) {
throw new ElasticsearchParseException("shape type not included");
} 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) {





