Module org.elasticsearch.server
Class AggregationInspectionHelper
java.lang.Object
org.elasticsearch.search.aggregations.support.AggregationInspectionHelper
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanhasValue(InternalFilter agg) static booleanhasValue(InternalFilters agg) static booleanhasValue(InternalGeoGrid<?> agg) static booleanhasValue(InternalGlobal agg) static booleanstatic booleanstatic booleanstatic booleanhasValue(InternalMissing agg) static booleanstatic booleanhasValue(InternalNested agg) static booleanstatic booleanhasValue(InternalRange<?, ?> agg) static booleanhasValue(InternalSampler agg) static booleanhasValue(UnmappedSampler agg) static booleanhasValue(InternalSignificantTerms<?, ?> agg) static <A extends InternalTerms<A,B>, B extends InternalTerms.Bucket<B>>
booleanhasValue(InternalTerms<A, B> agg) static booleanstatic booleanhasValue(UnmappedTerms agg) static booleanhasValue(InternalAvg agg) static booleanhasValue(InternalBounds<?> agg) static booleanstatic booleanhasValue(InternalCentroid agg) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanhasValue(InternalStats agg) static booleanstatic booleanstatic booleanhasValue(InternalTopHits agg) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic boolean
-
Constructor Details
-
AggregationInspectionHelper
public AggregationInspectionHelper()
-
-
Method Details
-
hasValue
public static <A extends InternalTerms<A,B>, boolean hasValueB extends InternalTerms.Bucket<B>> (InternalTerms<A, B> agg) -
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-