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

版本: 6.8-8.9

简而言之,当 Elasticsearch 期望单点数据却收到多点数据时会发生此错误。这通常发生在你尝试索引地理空间数据时。Elasticsearch 会区分单点(如 ‘geo_point’)和多点(如 ‘geo_shape’)数据类型。要解决此问题,请确保映射中的数据类型与你尝试索引的数据相匹配。如果你处理的是多点数据,请使用 ‘geo_shape’。如果是单点数据,请使用 ‘geo_point’。此外,检查你的数据输入以确保其格式正确。

日志上下文 #

日志 “multipoint data provided when single point data expected.” 的类名是 GeoShapeType.java. 我们从 Elasticsearch 源代码中提取了以下内容,以便那些需要深入上下文的人参考:

if (coordinates.isEmpty()) {
    throw new ElasticsearchParseException(
        "invalid number of points (0) provided when expecting a single coordinate ([lat, lng])"
    );
} else if (coordinates.children != null) {
    throw new ElasticsearchParseException("multipoint data provided when single point data expected.");
}
return coordinates;
    }
};
MULTIPOINT("multipoint") {