📜  使用 NEST c# 代码示例处理聚合响应

📅  最后修改于: 2022-03-11 14:49:05.136000             🧑  作者: Mango

代码示例1
response.ShouldBeValid();

var childAggregation = response.Aggregations.Children("name_of_child_agg");

var averagePerChild = childAggregation.Average("average_per_child");

averagePerChild.Should().NotBeNull(); 

var maxPerChild = childAggregation.Max("max_per_child");

maxPerChild.Should().NotBeNull();