📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.15

简而言之,当 Elasticsearch 期望多点对象的数据但未提供时,就会出现此错误。这通常发生在你尝试索引带有 geo_shape 字段的文档时,但多点对象的坐标缺失或为空。要解决此问题,请确保你尝试索引的文档包含多点对象的有效坐标。或者,你可以在映射中将 ignore_malformed 选项设置为 true,这将允许即使包含格式错误的 geo_shapes 的文档也能被索引。

日志上下文 #

日志 “no data provided for multipoint object when expecting” 的类名是 GeoShapeType.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

if (coordinates.children == null || coordinates.children.isEmpty()) {
    if (coordinates.coordinate != null) {
        throw new ElasticsearchParseException("single coordinate found when expecting an array of " +
            "coordinates. change type to point or change data to an array of >0 coordinates");
    }
    throw new ElasticsearchParseException("no data provided for multipoint object when expecting " +
        ">0 points (e.g., [[lat, lng]] or [[lat, lng], ...])");
} else {
    for (CoordinateNode point : coordinates.children) {
        POINT.validate(point, coerce);
    }
}