Class AggregationInspectionHelper

java.lang.Object
org.elasticsearch.search.aggregations.support.AggregationInspectionHelper

public class AggregationInspectionHelper
extends java.lang.Object
Provides a set of static helpers to determine if a particular type of InternalAggregation "has a value" or not. This can be difficult to determine from an external perspective because each agg uses different internal bookkeeping to determine if it is empty or not (NaN, +/-Inf, 0.0, etc). This set of helpers aim to ease that task by codifying what "empty" is for each agg. It is not entirely accurate for all aggs, since some do not expose or track the needed state (e.g. sum doesn't record count, so it's not clear if the sum is 0.0 because it is empty or because of summing to zero). Pipeline aggs in particular are not well supported by these helpers since most share InternalSimpleValue and it's not clear which pipeline generated the value.