Max children is only supported on v6.5.0 or higher – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.16-7.17

Briefly, this error occurs when you’re trying to use the “max_children” feature on an Elasticsearch version that is lower than 6.5.0. This feature is not supported in earlier versions. To resolve this issue, you can either upgrade your Elasticsearch to version 6.5.0 or higher, or refrain from using the “max_children” feature if upgrading is not an option. Please ensure to backup your data before upgrading to prevent any data loss.

This guide will help you check for common problems that cause the log ” max_children is only supported on v6.5.0 or higher ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: sort, search.

Log Context

Log “max_children is only supported on v6.5.0 or higher” class name is ScriptSortBuilder.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 }  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 {

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?