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

版本: 7.16-7.17

简而言之,当你尝试在低于 6.5.0 的 Elasticsearch 版本上使用 “max_children” 功能时,会出现此错误。早期版本不支持此功能。要解决此问题,你可以将 Elasticsearch 升级到 6.5.0 或更高版本,或者如果无法升级,则不要使用 “max_children” 功能。请确保在升级前备份数据,以防数据丢失。

日志上下文 #

日志 “max_children is only supported on v6.5.0 or higher” 的类名是 ScriptSortBuilder.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

}  final Nested nested;
 if (nestedSort != null) {
 if (context.indexVersionCreated().before(Version.V_6_5_0) && nestedSort.getMaxChildren() != Integer.MAX_VALUE) {
 throw new QueryShardException(context; "max_children is only supported on v6.5.0 or higher");
 }
 // new nested sorts takes priority
 validateMaxChildrenExistOnlyInTopLevelNestedSort(context; nestedSort);
 nested = resolveNested(context; nestedSort);
 } else {