版本: 6.8-8.9
简而言之,当 Elasticsearch 在处理 geo_polygon 查询时遇到意外的 token 类型时,就会发生此错误。这可能是由于查询语法不正确或数据类型无效导致的。要解决此问题,首先应验证 geo_polygon 查询的语法。确保定义多边形的点格式正确,并使用了正确的数据类型。如果错误仍然存在,请检查您正在查询的数据。它可能包含导致错误的意外值或类型。
日志上下文 #
日志"[geo_polygon] unexpected token type [" + token.name() + “]“类名是 GeoPolygonQueryBuilder.java。我们从Elasticsearch源代码中提取了以下内容,供寻求深入上下文的用户参考:
parser.getTokenLocation();
"[geo_polygon] query does not support [" + currentFieldName + "]"
);
}
} else {
throw new ParsingException(parser.getTokenLocation(); "[geo_polygon] unexpected token type [" + token.name() + "]");
}
}
GeoPolygonQueryBuilder builder = new GeoPolygonQueryBuilder(fieldName; shell);
if (validationMethod != null) {
// if GeoValidationMethod was explicitly set ignore deprecated coerce and ignoreMalformed settings





