Extended bounds min min cannot be greater than – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.4

Briefly, this error occurs when the ‘min’ value in the ‘extended_bounds’ parameter of an Elasticsearch aggregation query is set higher than the ‘max’ value. This is incorrect as the ‘min’ value should always be less than or equal to the ‘max’ value. To resolve this issue, you should adjust your query to ensure that the ‘min’ value is less than or equal to the ‘max’ value. Alternatively, you can remove the ‘extended_bounds’ parameter if it’s not necessary for your query.

This guide will help you check for common problems that cause the log ” [extended_bounds.min][” + min + “] cannot be greater than ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: search, aggregations.

Log Context

Log “[extended_bounds.min][” + min + “] cannot be greater than ” class name is ExtendedBounds.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 if (maxAsStr != null) {
 // TODO: Should we rather pass roundUp=true?
 max = format.parseLong(maxAsStr; false; context.getQueryShardContext()::nowInMillis);
 }
 if (min != null && max != null && min.compareTo(max) > 0) {
 throw new SearchParseException(context; "[extended_bounds.min][" + min + "] cannot be greater than " +
 "[extended_bounds.max][" + max + "] for histogram aggregation [" + aggName + "]"; null);
 }
 return new ExtendedBounds(min; max; minAsStr; maxAsStr);
 }

 

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?