Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Handling aggregation responses with NEST c#

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();
Source by www.elastic.co #
 
PREVIOUS NEXT
Tagged: #Handling #aggregation #responses #NEST
ADD COMMENT
Topic
Name
9+6 =