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 booleanstatic booleanhasValue(InternalFilter agg)static booleanhasValue(InternalFilters agg)static booleanhasValue(InternalGeoGrid<?> agg)static booleanhasValue(InternalGlobal agg)static booleanstatic booleanstatic booleanstatic booleanstatic booleanhasValue(InternalMissing agg)static booleanhasValue(InternalNested agg)static booleanstatic <B extends InternalRange.Bucket, R extends InternalRange<B, R>>
booleanhasValue(InternalRange<B,R> agg)static booleanhasValue(InternalSampler agg)static booleanhasValue(UnmappedSampler agg)static <A extends InternalSignificantTerms<A, B>, B extends InternalSignificantTerms.Bucket<B>>
booleanhasValue(InternalSignificantTerms<A,B> 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 booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanhasValue(InternalMax agg)static booleanstatic booleanhasValue(InternalMin agg)static booleanstatic booleanhasValue(InternalStats agg)static booleanhasValue(InternalSum agg)static booleanstatic booleanstatic booleanhasValue(InternalTopHits agg)static booleanstatic booleanstatic booleanstatic booleanstatic boolean
-
Constructor Details
-
AggregationInspectionHelper
public AggregationInspectionHelper()
-
-
Method Details
-
hasValue
public static <A extends InternalTerms<A, B>, B extends InternalTerms.Bucket<B>> boolean hasValue(InternalTerms<A,B> agg) -
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
public static <B extends InternalRange.Bucket, R extends InternalRange<B, R>> boolean hasValue(InternalRange<B,R> agg) -
hasValue
-
hasValue
public static <A extends InternalSignificantTerms<A, B>, B extends InternalSignificantTerms.Bucket<B>> boolean hasValue(InternalSignificantTerms<A,B> agg) -
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-
hasValue
-