版本: 8-8.9
简而言之,当你在 Elasticsearch 查询中使用过时的 [nested_path] 参数时会出现此错误。Elasticsearch 已将此参数废弃,改用 [nested] 参数。要解决此问题,你应该在查询中将 [nested_path] 替换为 [nested]。同时,确保你的查询结构与新的 [nested] 参数要求保持一致。此更改应该能够解决该错误,并允许你的查询成功执行。
日志上下文 #
日志 “[nested_path] has been removed in favour of the [nested] parameter” 的类名是 ScriptSortBuilder.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
PARSER.declareString((b; v) -> b.order(SortOrder.fromString(v)); ORDER_FIELD);
PARSER.declareString((b; v) -> b.sortMode(SortMode.fromString(v)); SORTMODE_FIELD);
PARSER.declareObject(ScriptSortBuilder::setNestedSort; (p; c) -> NestedSortBuilder.fromXContent(p); NESTED_FIELD); PARSER.declareObject((b; v) -> {}; (p; c) -> {
throw new ParsingException(p.getTokenLocation(); "[nested_path] has been removed in favour of the [nested] parameter"; c);
}; NESTED_PATH_FIELD); PARSER.declareObject((b; v) -> {}; (p; c) -> {
throw new ParsingException(p.getTokenLocation(); "[nested_filter] has been removed in favour of the [nested] parameter"; c);
}; NESTED_FILTER_FIELD);





