Class AggregationBuilders
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilders
public class AggregationBuilders
extends java.lang.Object
Utility class to create aggregations.
-
Method Summary
Modifier and Type Method Description static AdjacencyMatrixAggregationBuilderadjacencyMatrix(java.lang.String name, java.lang.String separator, java.util.Map<java.lang.String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name and separatorstatic AdjacencyMatrixAggregationBuilderadjacencyMatrix(java.lang.String name, java.util.Map<java.lang.String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name.static AvgAggregationBuilderavg(java.lang.String name)Create a newAvgaggregation with the given name.static CardinalityAggregationBuildercardinality(java.lang.String name)Create a newCardinalityaggregation with the given name.static CompositeAggregationBuildercomposite(java.lang.String name, java.util.List<CompositeValuesSourceBuilder<?>> sources)Create a newCompositeAggregationBuilderaggregation with the given name.static ValueCountAggregationBuildercount(java.lang.String name)Create a newValueCountaggregation with the given name.static DateHistogramAggregationBuilderdateHistogram(java.lang.String name)Create a newDateHistogramAggregationBuilderaggregation with the given name.static DateRangeAggregationBuilderdateRange(java.lang.String name)Create a newDateRangeAggregationBuilderaggregation with the given name.static DiversifiedAggregationBuilderdiversifiedSampler(java.lang.String name)Create a newSampleraggregation with the given name.static ExtendedStatsAggregationBuilderextendedStats(java.lang.String name)Create a newExtendedStatsaggregation with the given name.static FilterAggregationBuilderfilter(java.lang.String name, QueryBuilder filter)Create a newFilteraggregation with the given name.static FiltersAggregationBuilderfilters(java.lang.String name, QueryBuilder... filters)Create a newFiltersaggregation with the given name.static FiltersAggregationBuilderfilters(java.lang.String name, FiltersAggregator.KeyedFilter... filters)Create a newFiltersaggregation with the given name.static GeoBoundsAggregationBuildergeoBounds(java.lang.String name)Create a newGeoBoundsaggregation with the given name.static GeoCentroidAggregationBuildergeoCentroid(java.lang.String name)Create a newGeoCentroidaggregation with the given name.static GeoDistanceAggregationBuildergeoDistance(java.lang.String name, GeoPoint origin)Create a newGeoDistanceaggregation with the given name.static GeoHashGridAggregationBuildergeohashGrid(java.lang.String name)Create a newInternalGeoHashGridaggregation with the given name.static GeoTileGridAggregationBuildergeotileGrid(java.lang.String name)Create a newInternalGeoTileGridaggregation with the given name.static GlobalAggregationBuilderglobal(java.lang.String name)Create a newGlobalaggregation with the given name.static HistogramAggregationBuilderhistogram(java.lang.String name)Create a newHistogramaggregation with the given name.static IpRangeAggregationBuilderipRange(java.lang.String name)Create a newIpRangeAggregationBuilderaggregation with the given name.static MaxAggregationBuildermax(java.lang.String name)Create a newMaxaggregation with the given name.static MedianAbsoluteDeviationAggregationBuildermedianAbsoluteDeviation(java.lang.String name)Create a newMedianAbsoluteDeviationaggregation with the given namestatic MinAggregationBuildermin(java.lang.String name)Create a newMinaggregation with the given name.static MissingAggregationBuildermissing(java.lang.String name)Create a newMissingaggregation with the given name.static NestedAggregationBuildernested(java.lang.String name, java.lang.String path)Create a newNestedaggregation with the given name.static PercentileRanksAggregationBuilderpercentileRanks(java.lang.String name, double[] values)Create a newPercentileRanksaggregation with the given name.static PercentilesAggregationBuilderpercentiles(java.lang.String name)Create a newPercentilesaggregation with the given name.static RangeAggregationBuilderrange(java.lang.String name)Create a newRangeaggregation with the given name.static ReverseNestedAggregationBuilderreverseNested(java.lang.String name)Create a newReverseNestedaggregation with the given name.static SamplerAggregationBuildersampler(java.lang.String name)Create a newSampleraggregation with the given name.static ScriptedMetricAggregationBuilderscriptedMetric(java.lang.String name)Create a newScriptedMetricaggregation with the given name.static SignificantTermsAggregationBuildersignificantTerms(java.lang.String name)Create a newSignificantTermsaggregation with the given name.static SignificantTextAggregationBuildersignificantText(java.lang.String name, java.lang.String fieldName)Create a newSignificantTextAggregationBuilderaggregation with the given name and text field namestatic StatsAggregationBuilderstats(java.lang.String name)Create a newStatsaggregation with the given name.static SumAggregationBuildersum(java.lang.String name)Create a newSumaggregation with the given name.static TermsAggregationBuilderterms(java.lang.String name)Create a newTermsaggregation with the given name.static TopHitsAggregationBuildertopHits(java.lang.String name)Create a newTopHitsaggregation with the given name.static WeightedAvgAggregationBuilderweightedAvg(java.lang.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(java.lang.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(java.lang.String name, java.util.Map<java.lang.String,QueryBuilder> filters)Create a newAdjacencyMatrixaggregation with the given name. -
adjacencyMatrix
public static AdjacencyMatrixAggregationBuilder adjacencyMatrix(java.lang.String name, java.lang.String separator, java.util.Map<java.lang.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
public static SignificantTextAggregationBuilder significantText(java.lang.String name, java.lang.String fieldName)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
public static PercentileRanksAggregationBuilder percentileRanks(java.lang.String name, double[] values)Create a newPercentileRanksaggregation with the given name. -
medianAbsoluteDeviation
public static MedianAbsoluteDeviationAggregationBuilder medianAbsoluteDeviation(java.lang.String name)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(java.lang.String name, java.util.List<CompositeValuesSourceBuilder<?>> sources)Create a newCompositeAggregationBuilderaggregation with the given name.
-