Class Aggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.Aggregation
- All Implemented Interfaces:
JsonpSerializable,OpenTaggedUnion<Aggregation.Kind,,Object> TaggedUnion<Aggregation.Kind,Object>
@JsonpDeserializable
public class Aggregation
extends Object
implements OpenTaggedUnion<Aggregation.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_custom()Get the custom plugin-defined variant value.final StringGet the actual kind when_kind()equalsAggregation.Kind._Custom(plugin-defined variant).final Object_get()booleanIs this a customAggregationdefined by a plugin?final Aggregation.Kind_kind()Get the of the kind of variant held by this object.Get theadjacency_matrixvariant value.final Map<String,Aggregation> Sub-aggregations for this aggregation.Get theauto_date_histogramvariant value.avg()Get theavgvariant value.Get theavg_bucketvariant value.boxplot()Get theboxplotvariant value.Get thebucket_correlationvariant value.Get thebucket_count_ks_testvariant value.Get thebucket_scriptvariant value.Get thebucket_selectorvariant value.Get thebucket_sortvariant value.Get thecardinalityvariant value.Get thecategorize_textvariant value.children()Get thechildrenvariant value.Get thecompositevariant value.Get thecumulative_cardinalityvariant value.Get thecumulative_sumvariant value.Get thedate_histogramvariant value.Get thedate_rangevariant value.Get thederivativevariant value.Get thediversified_samplervariant value.Get theextended_statsvariant value.Get theextended_stats_bucketvariant value.filter()Get thefiltervariant value.filters()Get thefiltersvariant value.Get thegeo_boundsvariant value.Get thegeo_centroidvariant value.Get thegeo_distancevariant value.Get thegeohash_gridvariant value.Get thegeohex_gridvariant value.geoLine()Get thegeo_linevariant value.Get thegeotile_gridvariant value.global()Get theglobalvariant value.Get thehistogramvariant value.Get theinferencevariant value.ipPrefix()Get theip_prefixvariant value.ipRange()Get theip_rangevariant value.booleanIs this variant instance of kindadjacency_matrix?booleanIs this variant instance of kindauto_date_histogram?booleanisAvg()Is this variant instance of kindavg?booleanIs this variant instance of kindavg_bucket?booleanIs this variant instance of kindboxplot?booleanIs this variant instance of kindbucket_correlation?booleanIs this variant instance of kindbucket_count_ks_test?booleanIs this variant instance of kindbucket_script?booleanIs this variant instance of kindbucket_selector?booleanIs this variant instance of kindbucket_sort?booleanIs this variant instance of kindcardinality?booleanIs this variant instance of kindcategorize_text?booleanIs this variant instance of kindchildren?booleanIs this variant instance of kindcomposite?booleanIs this variant instance of kindcumulative_cardinality?booleanIs this variant instance of kindcumulative_sum?booleanIs this variant instance of kinddate_histogram?booleanIs this variant instance of kinddate_range?booleanIs this variant instance of kindderivative?booleanIs this variant instance of kinddiversified_sampler?booleanIs this variant instance of kindextended_stats?booleanIs this variant instance of kindextended_stats_bucket?booleanisFilter()Is this variant instance of kindfilter?booleanIs this variant instance of kindfilters?booleanIs this variant instance of kindgeo_bounds?booleanIs this variant instance of kindgeo_centroid?booleanIs this variant instance of kindgeo_distance?booleanIs this variant instance of kindgeohash_grid?booleanIs this variant instance of kindgeohex_grid?booleanIs this variant instance of kindgeo_line?booleanIs this variant instance of kindgeotile_grid?booleanisGlobal()Is this variant instance of kindglobal?booleanIs this variant instance of kindhistogram?booleanIs this variant instance of kindinference?booleanIs this variant instance of kindip_prefix?booleanIs this variant instance of kindip_range?booleanIs this variant instance of kindmatrix_stats?booleanisMax()Is this variant instance of kindmax?booleanIs this variant instance of kindmax_bucket?booleanIs this variant instance of kindmedian_absolute_deviation?booleanisMin()Is this variant instance of kindmin?booleanIs this variant instance of kindmin_bucket?booleanIs this variant instance of kindmissing?booleanIs this variant instance of kindmoving_avg?booleanIs this variant instance of kindmoving_fn?booleanIs this variant instance of kindmoving_percentiles?booleanIs this variant instance of kindmulti_terms?booleanisNested()Is this variant instance of kindnested?booleanIs this variant instance of kindnormalize?booleanisParent()Is this variant instance of kindparent?booleanIs this variant instance of kindpercentile_ranks?booleanIs this variant instance of kindpercentiles?booleanIs this variant instance of kindpercentiles_bucket?booleanisRange()Is this variant instance of kindrange?booleanIs this variant instance of kindrare_terms?booleanisRate()Is this variant instance of kindrate?booleanIs this variant instance of kindreverse_nested?booleanIs this variant instance of kindsampler?booleanIs this variant instance of kindscripted_metric?booleanIs this variant instance of kindserial_diff?booleanIs this variant instance of kindsignificant_terms?booleanIs this variant instance of kindsignificant_text?booleanisStats()Is this variant instance of kindstats?booleanIs this variant instance of kindstats_bucket?booleanIs this variant instance of kindstring_stats?booleanisSum()Is this variant instance of kindsum?booleanIs this variant instance of kindsum_bucket?booleanisTerms()Is this variant instance of kindterms?booleanIs this variant instance of kindtop_hits?booleanIs this variant instance of kindtop_metrics?booleanisTTest()Is this variant instance of kindt_test?booleanIs this variant instance of kindvalue_count?booleanIs this variant instance of kindvariable_width_histogram?booleanIs this variant instance of kindweighted_avg?Get thematrix_statsvariant value.max()Get themaxvariant value.Get themax_bucketvariant value.Get themedian_absolute_deviationvariant value.meta()API name:metamin()Get theminvariant value.Get themin_bucketvariant value.missing()Get themissingvariant value.Get themoving_avgvariant value.movingFn()Get themoving_fnvariant value.Get themoving_percentilesvariant value.Get themulti_termsvariant value.nested()Get thenestedvariant value.Get thenormalizevariant value.static Aggregationparent()Get theparentvariant value.Get thepercentile_ranksvariant value.Get thepercentilesvariant value.Get thepercentiles_bucketvariant value.range()Get therangevariant value.Get therare_termsvariant value.rate()Get theratevariant value.Get thereverse_nestedvariant value.sampler()Get thesamplervariant value.Get thescripted_metricvariant value.Get theserial_diffvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidGet thesignificant_termsvariant value.Get thesignificant_textvariant value.stats()Get thestatsvariant value.Get thestats_bucketvariant value.Get thestring_statsvariant value.sum()Get thesumvariant value.Get thesum_bucketvariant value.terms()Get thetermsvariant value.topHits()Get thetop_hitsvariant value.Get thetop_metricsvariant value.toString()tTest()Get thet_testvariant value.Get thevalue_countvariant value.Get thevariable_width_histogramvariant value.Get theweighted_avgvariant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Aggregation
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Aggregation.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<Aggregation.Kind,Object>
-
of
-
aggregations
Sub-aggregations for this aggregation. Only applies to bucket aggregations.API name:
aggregations -
meta
API name:meta -
isAdjacencyMatrix
public boolean isAdjacencyMatrix()Is this variant instance of kindadjacency_matrix? -
adjacencyMatrix
Get theadjacency_matrixvariant value.- Throws:
IllegalStateException- if the current variant is not of theadjacency_matrixkind.
-
isAutoDateHistogram
public boolean isAutoDateHistogram()Is this variant instance of kindauto_date_histogram? -
autoDateHistogram
Get theauto_date_histogramvariant value.- Throws:
IllegalStateException- if the current variant is not of theauto_date_histogramkind.
-
isAvg
public boolean isAvg()Is this variant instance of kindavg? -
avg
Get theavgvariant value.- Throws:
IllegalStateException- if the current variant is not of theavgkind.
-
isAvgBucket
public boolean isAvgBucket()Is this variant instance of kindavg_bucket? -
avgBucket
Get theavg_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of theavg_bucketkind.
-
isBoxplot
public boolean isBoxplot()Is this variant instance of kindboxplot? -
boxplot
Get theboxplotvariant value.- Throws:
IllegalStateException- if the current variant is not of theboxplotkind.
-
isBucketScript
public boolean isBucketScript()Is this variant instance of kindbucket_script? -
bucketScript
Get thebucket_scriptvariant value.- Throws:
IllegalStateException- if the current variant is not of thebucket_scriptkind.
-
isBucketSelector
public boolean isBucketSelector()Is this variant instance of kindbucket_selector? -
bucketSelector
Get thebucket_selectorvariant value.- Throws:
IllegalStateException- if the current variant is not of thebucket_selectorkind.
-
isBucketSort
public boolean isBucketSort()Is this variant instance of kindbucket_sort? -
bucketSort
Get thebucket_sortvariant value.- Throws:
IllegalStateException- if the current variant is not of thebucket_sortkind.
-
isBucketCountKsTest
public boolean isBucketCountKsTest()Is this variant instance of kindbucket_count_ks_test? -
bucketCountKsTest
Get thebucket_count_ks_testvariant value.- Throws:
IllegalStateException- if the current variant is not of thebucket_count_ks_testkind.
-
isBucketCorrelation
public boolean isBucketCorrelation()Is this variant instance of kindbucket_correlation? -
bucketCorrelation
Get thebucket_correlationvariant value.- Throws:
IllegalStateException- if the current variant is not of thebucket_correlationkind.
-
isCardinality
public boolean isCardinality()Is this variant instance of kindcardinality? -
cardinality
Get thecardinalityvariant value.- Throws:
IllegalStateException- if the current variant is not of thecardinalitykind.
-
isCategorizeText
public boolean isCategorizeText()Is this variant instance of kindcategorize_text? -
categorizeText
Get thecategorize_textvariant value.- Throws:
IllegalStateException- if the current variant is not of thecategorize_textkind.
-
isChildren
public boolean isChildren()Is this variant instance of kindchildren? -
children
Get thechildrenvariant value.- Throws:
IllegalStateException- if the current variant is not of thechildrenkind.
-
isComposite
public boolean isComposite()Is this variant instance of kindcomposite? -
composite
Get thecompositevariant value.- Throws:
IllegalStateException- if the current variant is not of thecompositekind.
-
isCumulativeCardinality
public boolean isCumulativeCardinality()Is this variant instance of kindcumulative_cardinality? -
cumulativeCardinality
Get thecumulative_cardinalityvariant value.- Throws:
IllegalStateException- if the current variant is not of thecumulative_cardinalitykind.
-
isCumulativeSum
public boolean isCumulativeSum()Is this variant instance of kindcumulative_sum? -
cumulativeSum
Get thecumulative_sumvariant value.- Throws:
IllegalStateException- if the current variant is not of thecumulative_sumkind.
-
isDateHistogram
public boolean isDateHistogram()Is this variant instance of kinddate_histogram? -
dateHistogram
Get thedate_histogramvariant value.- Throws:
IllegalStateException- if the current variant is not of thedate_histogramkind.
-
isDateRange
public boolean isDateRange()Is this variant instance of kinddate_range? -
dateRange
Get thedate_rangevariant value.- Throws:
IllegalStateException- if the current variant is not of thedate_rangekind.
-
isDerivative
public boolean isDerivative()Is this variant instance of kindderivative? -
derivative
Get thederivativevariant value.- Throws:
IllegalStateException- if the current variant is not of thederivativekind.
-
isDiversifiedSampler
public boolean isDiversifiedSampler()Is this variant instance of kinddiversified_sampler? -
diversifiedSampler
Get thediversified_samplervariant value.- Throws:
IllegalStateException- if the current variant is not of thediversified_samplerkind.
-
isExtendedStats
public boolean isExtendedStats()Is this variant instance of kindextended_stats? -
extendedStats
Get theextended_statsvariant value.- Throws:
IllegalStateException- if the current variant is not of theextended_statskind.
-
isExtendedStatsBucket
public boolean isExtendedStatsBucket()Is this variant instance of kindextended_stats_bucket? -
extendedStatsBucket
Get theextended_stats_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of theextended_stats_bucketkind.
-
isFilter
public boolean isFilter()Is this variant instance of kindfilter? -
filter
Get thefiltervariant value.- Throws:
IllegalStateException- if the current variant is not of thefilterkind.
-
isFilters
public boolean isFilters()Is this variant instance of kindfilters? -
filters
Get thefiltersvariant value.- Throws:
IllegalStateException- if the current variant is not of thefilterskind.
-
isGeoBounds
public boolean isGeoBounds()Is this variant instance of kindgeo_bounds? -
geoBounds
Get thegeo_boundsvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeo_boundskind.
-
isGeoCentroid
public boolean isGeoCentroid()Is this variant instance of kindgeo_centroid? -
geoCentroid
Get thegeo_centroidvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeo_centroidkind.
-
isGeoDistance
public boolean isGeoDistance()Is this variant instance of kindgeo_distance? -
geoDistance
Get thegeo_distancevariant value.- Throws:
IllegalStateException- if the current variant is not of thegeo_distancekind.
-
isGeohashGrid
public boolean isGeohashGrid()Is this variant instance of kindgeohash_grid? -
geohashGrid
Get thegeohash_gridvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeohash_gridkind.
-
isGeoLine
public boolean isGeoLine()Is this variant instance of kindgeo_line? -
geoLine
Get thegeo_linevariant value.- Throws:
IllegalStateException- if the current variant is not of thegeo_linekind.
-
isGeotileGrid
public boolean isGeotileGrid()Is this variant instance of kindgeotile_grid? -
geotileGrid
Get thegeotile_gridvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeotile_gridkind.
-
isGeohexGrid
public boolean isGeohexGrid()Is this variant instance of kindgeohex_grid? -
geohexGrid
Get thegeohex_gridvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeohex_gridkind.
-
isGlobal
public boolean isGlobal()Is this variant instance of kindglobal? -
global
Get theglobalvariant value.- Throws:
IllegalStateException- if the current variant is not of theglobalkind.
-
isHistogram
public boolean isHistogram()Is this variant instance of kindhistogram? -
histogram
Get thehistogramvariant value.- Throws:
IllegalStateException- if the current variant is not of thehistogramkind.
-
isIpRange
public boolean isIpRange()Is this variant instance of kindip_range? -
ipRange
Get theip_rangevariant value.- Throws:
IllegalStateException- if the current variant is not of theip_rangekind.
-
isIpPrefix
public boolean isIpPrefix()Is this variant instance of kindip_prefix? -
ipPrefix
Get theip_prefixvariant value.- Throws:
IllegalStateException- if the current variant is not of theip_prefixkind.
-
isInference
public boolean isInference()Is this variant instance of kindinference? -
inference
Get theinferencevariant value.- Throws:
IllegalStateException- if the current variant is not of theinferencekind.
-
isMatrixStats
public boolean isMatrixStats()Is this variant instance of kindmatrix_stats? -
matrixStats
Get thematrix_statsvariant value.- Throws:
IllegalStateException- if the current variant is not of thematrix_statskind.
-
isMax
public boolean isMax()Is this variant instance of kindmax? -
max
Get themaxvariant value.- Throws:
IllegalStateException- if the current variant is not of themaxkind.
-
isMaxBucket
public boolean isMaxBucket()Is this variant instance of kindmax_bucket? -
maxBucket
Get themax_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of themax_bucketkind.
-
isMedianAbsoluteDeviation
public boolean isMedianAbsoluteDeviation()Is this variant instance of kindmedian_absolute_deviation? -
medianAbsoluteDeviation
Get themedian_absolute_deviationvariant value.- Throws:
IllegalStateException- if the current variant is not of themedian_absolute_deviationkind.
-
isMin
public boolean isMin()Is this variant instance of kindmin? -
min
Get theminvariant value.- Throws:
IllegalStateException- if the current variant is not of theminkind.
-
isMinBucket
public boolean isMinBucket()Is this variant instance of kindmin_bucket? -
minBucket
Get themin_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of themin_bucketkind.
-
isMissing
public boolean isMissing()Is this variant instance of kindmissing? -
missing
Get themissingvariant value.- Throws:
IllegalStateException- if the current variant is not of themissingkind.
-
isMovingAvg
public boolean isMovingAvg()Is this variant instance of kindmoving_avg? -
movingAvg
Get themoving_avgvariant value.- Throws:
IllegalStateException- if the current variant is not of themoving_avgkind.
-
isMovingPercentiles
public boolean isMovingPercentiles()Is this variant instance of kindmoving_percentiles? -
movingPercentiles
Get themoving_percentilesvariant value.- Throws:
IllegalStateException- if the current variant is not of themoving_percentileskind.
-
isMovingFn
public boolean isMovingFn()Is this variant instance of kindmoving_fn? -
movingFn
Get themoving_fnvariant value.- Throws:
IllegalStateException- if the current variant is not of themoving_fnkind.
-
isMultiTerms
public boolean isMultiTerms()Is this variant instance of kindmulti_terms? -
multiTerms
Get themulti_termsvariant value.- Throws:
IllegalStateException- if the current variant is not of themulti_termskind.
-
isNested
public boolean isNested()Is this variant instance of kindnested? -
nested
Get thenestedvariant value.- Throws:
IllegalStateException- if the current variant is not of thenestedkind.
-
isNormalize
public boolean isNormalize()Is this variant instance of kindnormalize? -
normalize
Get thenormalizevariant value.- Throws:
IllegalStateException- if the current variant is not of thenormalizekind.
-
isParent
public boolean isParent()Is this variant instance of kindparent? -
parent
Get theparentvariant value.- Throws:
IllegalStateException- if the current variant is not of theparentkind.
-
isPercentileRanks
public boolean isPercentileRanks()Is this variant instance of kindpercentile_ranks? -
percentileRanks
Get thepercentile_ranksvariant value.- Throws:
IllegalStateException- if the current variant is not of thepercentile_rankskind.
-
isPercentiles
public boolean isPercentiles()Is this variant instance of kindpercentiles? -
percentiles
Get thepercentilesvariant value.- Throws:
IllegalStateException- if the current variant is not of thepercentileskind.
-
isPercentilesBucket
public boolean isPercentilesBucket()Is this variant instance of kindpercentiles_bucket? -
percentilesBucket
Get thepercentiles_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of thepercentiles_bucketkind.
-
isRange
public boolean isRange()Is this variant instance of kindrange? -
range
Get therangevariant value.- Throws:
IllegalStateException- if the current variant is not of therangekind.
-
isRareTerms
public boolean isRareTerms()Is this variant instance of kindrare_terms? -
rareTerms
Get therare_termsvariant value.- Throws:
IllegalStateException- if the current variant is not of therare_termskind.
-
isRate
public boolean isRate()Is this variant instance of kindrate? -
rate
Get theratevariant value.- Throws:
IllegalStateException- if the current variant is not of theratekind.
-
isReverseNested
public boolean isReverseNested()Is this variant instance of kindreverse_nested? -
reverseNested
Get thereverse_nestedvariant value.- Throws:
IllegalStateException- if the current variant is not of thereverse_nestedkind.
-
isSampler
public boolean isSampler()Is this variant instance of kindsampler? -
sampler
Get thesamplervariant value.- Throws:
IllegalStateException- if the current variant is not of thesamplerkind.
-
isScriptedMetric
public boolean isScriptedMetric()Is this variant instance of kindscripted_metric? -
scriptedMetric
Get thescripted_metricvariant value.- Throws:
IllegalStateException- if the current variant is not of thescripted_metrickind.
-
isSerialDiff
public boolean isSerialDiff()Is this variant instance of kindserial_diff? -
serialDiff
Get theserial_diffvariant value.- Throws:
IllegalStateException- if the current variant is not of theserial_diffkind.
-
isSignificantTerms
public boolean isSignificantTerms()Is this variant instance of kindsignificant_terms? -
significantTerms
Get thesignificant_termsvariant value.- Throws:
IllegalStateException- if the current variant is not of thesignificant_termskind.
-
isSignificantText
public boolean isSignificantText()Is this variant instance of kindsignificant_text? -
significantText
Get thesignificant_textvariant value.- Throws:
IllegalStateException- if the current variant is not of thesignificant_textkind.
-
isStats
public boolean isStats()Is this variant instance of kindstats? -
stats
Get thestatsvariant value.- Throws:
IllegalStateException- if the current variant is not of thestatskind.
-
isStatsBucket
public boolean isStatsBucket()Is this variant instance of kindstats_bucket? -
statsBucket
Get thestats_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of thestats_bucketkind.
-
isStringStats
public boolean isStringStats()Is this variant instance of kindstring_stats? -
stringStats
Get thestring_statsvariant value.- Throws:
IllegalStateException- if the current variant is not of thestring_statskind.
-
isSum
public boolean isSum()Is this variant instance of kindsum? -
sum
Get thesumvariant value.- Throws:
IllegalStateException- if the current variant is not of thesumkind.
-
isSumBucket
public boolean isSumBucket()Is this variant instance of kindsum_bucket? -
sumBucket
Get thesum_bucketvariant value.- Throws:
IllegalStateException- if the current variant is not of thesum_bucketkind.
-
isTerms
public boolean isTerms()Is this variant instance of kindterms? -
terms
Get thetermsvariant value.- Throws:
IllegalStateException- if the current variant is not of thetermskind.
-
isTopHits
public boolean isTopHits()Is this variant instance of kindtop_hits? -
topHits
Get thetop_hitsvariant value.- Throws:
IllegalStateException- if the current variant is not of thetop_hitskind.
-
isTTest
public boolean isTTest()Is this variant instance of kindt_test? -
tTest
Get thet_testvariant value.- Throws:
IllegalStateException- if the current variant is not of thet_testkind.
-
isTopMetrics
public boolean isTopMetrics()Is this variant instance of kindtop_metrics? -
topMetrics
Get thetop_metricsvariant value.- Throws:
IllegalStateException- if the current variant is not of thetop_metricskind.
-
isValueCount
public boolean isValueCount()Is this variant instance of kindvalue_count? -
valueCount
Get thevalue_countvariant value.- Throws:
IllegalStateException- if the current variant is not of thevalue_countkind.
-
isWeightedAvg
public boolean isWeightedAvg()Is this variant instance of kindweighted_avg? -
weightedAvg
Get theweighted_avgvariant value.- Throws:
IllegalStateException- if the current variant is not of theweighted_avgkind.
-
isVariableWidthHistogram
public boolean isVariableWidthHistogram()Is this variant instance of kindvariable_width_histogram? -
variableWidthHistogram
Get thevariable_width_histogramvariant value.- Throws:
IllegalStateException- if the current variant is not of thevariable_width_histogramkind.
-
_isCustom
public boolean _isCustom()Is this a customAggregationdefined by a plugin? -
_customKind
Get the actual kind when_kind()equalsAggregation.Kind._Custom(plugin-defined variant).- Specified by:
_customKindin interfaceOpenTaggedUnion<Aggregation.Kind,Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
IllegalStateException- if the current variant is notAggregation.Kind._Custom.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupAggregationDeserializer
-