版本: 6.8-8.9
简要来说,当您尝试在 Elasticsearch 中对一个未映射为 geo_point 类型的字段执行地理位置操作时,会发生此错误。要解决此问题,您可以使用正确的映射重新索引数据,或者使用脚本将字段转换为 geo_point 类型。同时,确保该字段包含有效的纬度和经度值。
日志上下文 #
日志 “field [” + fieldName + “] is not a geo_point field” 的类名是 GeoPolygonQueryBuilder.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
} else {
throw new QueryShardException(context; "failed to find geo_point field [" + fieldName + "]");
}
}
if ((fieldType instanceof GeoPointFieldType) == false) {
throw new QueryShardException(context; "field [" + fieldName + "] is not a geo_point field");
} Listshell = new ArrayList<>(this.shell.size());
for (GeoPoint geoPoint : this.shell) {
shell.add(new GeoPoint(geoPoint));





