Class AggregationBuilders
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilders
Utility class to create aggregations.
-
Method Summary
Modifier and TypeMethodDescriptionadjacencyMatrix(String name, String separator, Map<String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name and separatoradjacencyMatrix(String name, Map<String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name.static AvgAggregationBuilderCreate a newAvgaggregation with the given name.cardinality(String name)Create a newCardinalityaggregation with the given name.static CompositeAggregationBuildercomposite(String name, List<CompositeValuesSourceBuilder<?>> sources)Create a newCompositeAggregationBuilderaggregation with the given name.static ValueCountAggregationBuilderCreate a newValueCountaggregation with the given name.dateHistogram(String name)Create a newDateHistogramAggregationBuilderaggregation with the given name.static DateRangeAggregationBuilderCreate a newDateRangeAggregationBuilderaggregation with the given name.diversifiedSampler(String name)Create a newSampleraggregation with the given name.extendedStats(String name)Create a newExtendedStatsaggregation with the given name.static FilterAggregationBuilderfilter(String name, QueryBuilder filter)Create a newFilteraggregation with the given name.static FiltersAggregationBuilderfilters(String name, QueryBuilder... filters)Create a newFiltersaggregation with the given name.static FiltersAggregationBuilderfilters(String name, FiltersAggregator.KeyedFilter... filters)Create a newFiltersaggregation with the given name.static GeoBoundsAggregationBuilderCreate a newGeoBoundsaggregation with the given name.geoCentroid(String name)Create a newGeoCentroidaggregation with the given name.geoDistance(String name, GeoPoint origin)Create a newGeoDistanceaggregation with the given name.geohashGrid(String name)Create a newInternalGeoHashGridaggregation with the given name.geotileGrid(String name)Create a newInternalGeoTileGridaggregation with the given name.static GlobalAggregationBuilderCreate a newGlobalaggregation with the given name.static HistogramAggregationBuilderCreate a newHistogramaggregation with the given name.static IpRangeAggregationBuilderCreate a newIpRangeAggregationBuilderaggregation with the given name.static MaxAggregationBuilderCreate a newMaxaggregation with the given name.Create a newMedianAbsoluteDeviationaggregation with the given namestatic MinAggregationBuilderCreate a newMinaggregation with the given name.static MissingAggregationBuilderCreate a newMissingaggregation with the given name.static NestedAggregationBuilderCreate a newNestedaggregation with the given name.percentileRanks(String name, double[] values)Create a newPercentileRanksaggregation with the given name.percentiles(String name)Create a newPercentilesaggregation with the given name.static RangeAggregationBuilderCreate a newRangeaggregation with the given name.reverseNested(String name)Create a newReverseNestedaggregation with the given name.static SamplerAggregationBuilderCreate a newSampleraggregation with the given name.scriptedMetric(String name)Create a newScriptedMetricaggregation with the given name.significantTerms(String name)Create a newSignificantTermsaggregation with the given name.significantText(String name, String fieldName)Create a newSignificantTextAggregationBuilderaggregation with the given name and text field namestatic StatsAggregationBuilderCreate a newStatsaggregation with the given name.static SumAggregationBuilderCreate a newSumaggregation with the given name.static TermsAggregationBuilderCreate a newTermsaggregation with the given name.static TopHitsAggregationBuilderCreate a newTopHitsaggregation with the given name.weightedAvg(String name)Create a newAvgaggregation with the given name.
-
Method Details
-
count
Create a newValueCountaggregation with the given name. -
avg
Create a newAvgaggregation with the given name. -
weightedAvg
Create a newAvgaggregation with the given name. -
max
Create a newMaxaggregation with the given name. -
min
Create a newMinaggregation with the given name. -
sum
Create a newSumaggregation with the given name. -
stats
Create a newStatsaggregation with the given name. -
extendedStats
Create a newExtendedStatsaggregation with the given name. -
filter
Create a newFilteraggregation with the given name. -
filters
public static FiltersAggregationBuilder filters(String name, FiltersAggregator.KeyedFilter... filters)Create a newFiltersaggregation with the given name. -
filters
Create a newFiltersaggregation with the given name. -
adjacencyMatrix
public static AdjacencyMatrixAggregationBuilder adjacencyMatrix(String name, Map<String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name. -
adjacencyMatrix
public static AdjacencyMatrixAggregationBuilder adjacencyMatrix(String name, String separator, Map<String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name and separator -
sampler
Create a newSampleraggregation with the given name. -
diversifiedSampler
Create a newSampleraggregation with the given name. -
global
Create a newGlobalaggregation with the given name. -
missing
Create a newMissingaggregation with the given name. -
nested
Create a newNestedaggregation with the given name. -
reverseNested
Create a newReverseNestedaggregation with the given name. -
geoDistance
Create a newGeoDistanceaggregation with the given name. -
histogram
Create a newHistogramaggregation with the given name. -
geohashGrid
Create a newInternalGeoHashGridaggregation with the given name. -
geotileGrid
Create a newInternalGeoTileGridaggregation with the given name. -
significantTerms
Create a newSignificantTermsaggregation with the given name. -
significantText
Create a newSignificantTextAggregationBuilderaggregation with the given name and text field name -
dateHistogram
Create a newDateHistogramAggregationBuilderaggregation with the given name. -
range
Create a newRangeaggregation with the given name. -
dateRange
Create a newDateRangeAggregationBuilderaggregation with the given name. -
ipRange
Create a newIpRangeAggregationBuilderaggregation with the given name. -
terms
Create a newTermsaggregation with the given name. -
percentiles
Create a newPercentilesaggregation with the given name. -
percentileRanks
Create a newPercentileRanksaggregation with the given name. -
medianAbsoluteDeviation
Create a newMedianAbsoluteDeviationaggregation with the given name -
cardinality
Create a newCardinalityaggregation with the given name. -
topHits
Create a newTopHitsaggregation with the given name. -
geoBounds
Create a newGeoBoundsaggregation with the given name. -
geoCentroid
Create a newGeoCentroidaggregation with the given name. -
scriptedMetric
Create a newScriptedMetricaggregation with the given name. -
composite
public static CompositeAggregationBuilder composite(String name, List<CompositeValuesSourceBuilder<?>> sources)Create a newCompositeAggregationBuilderaggregation with the given name.
-