diff --git a/src/Nest/Aggregations/AggregateFormatter.cs b/src/Nest/Aggregations/AggregateFormatter.cs index e18346931e4..4e85f945162 100644 --- a/src/Nest/Aggregations/AggregateFormatter.cs +++ b/src/Nest/Aggregations/AggregateFormatter.cs @@ -258,6 +258,24 @@ private IAggregate GetBoxplotAggregate(ref JsonReader reader, IJsonFormatterReso reader.ReadNext(); // "q3" reader.ReadNext(); // : boxplot.Q3 = reader.ReadDouble(); + + // ES 7.11.0 adds these two additional properties on the payload + // When present on a 7.11 response, we avoid an exception by + // handling (and skipping) over the properties. The 7.11 client + // will add support for these new properties on BoxplotAggregate. + var token = reader.GetCurrentJsonToken(); + if (token != JsonToken.EndObject) + { + reader.ReadNext(); // , + reader.ReadNext(); // "lower" + reader.ReadNext(); // : + reader.ReadDouble(); + reader.ReadNext(); // , + reader.ReadNext(); // "upper" + reader.ReadNext(); // : + reader.ReadDouble(); + } + return boxplot; }