Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/Nest/Aggregations/AggregateFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down