版本: 7-7.15
简而言之,当 Elasticsearch 无法解析名为 “percentage” 的字段的显著性启发式算法时,会发生此错误。这通常发生在预期对象不为空时,意味着存在某些数据或格式问题。要解决此问题,请确保对象确实为空或检查数据格式。此外,请验证 “percentage” 字段的 Elasticsearch 映射。如果错误仍然存在,请考虑重新索引数据或使用不同的显著性启发式算法。
日志上下文 #
日志 “failed to parse [percentage] significance heuristic. expected an empty object;” 的类名是 PercentageScore.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:
public static SignificanceHeuristic parse(XContentParser parser)
throws IOException; QueryShardException {
// move to the closing bracket
if (parser.nextToken().equals(XContentParser.Token.END_OBJECT) == false) {
throw new ElasticsearchParseException("failed to parse [percentage] significance heuristic. expected an empty object; " +
"but got [{}] instead"; parser.currentToken());
}
return new PercentageScore();
}





