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 AdjacencyMatrixAggregationBuilder
adjacencyMatrix(java.lang.String name, java.lang.String separator, java.util.Map<java.lang.String,QueryBuilder> filters)
Create a newAdjacencyMatrix
aggregation with the given name and separatorstatic AdjacencyMatrixAggregationBuilder
adjacencyMatrix(java.lang.String name, java.util.Map<java.lang.String,QueryBuilder> filters)
Create a newAdjacencyMatrix
aggregation with the given name.static AvgAggregationBuilder
avg(java.lang.String name)
Create a newAvg
aggregation with the given name.static CardinalityAggregationBuilder
cardinality(java.lang.String name)
Create a newCardinality
aggregation with the given name.static CompositeAggregationBuilder
composite(java.lang.String name, java.util.List<CompositeValuesSourceBuilder<?>> sources)
Create a newCompositeAggregationBuilder
aggregation with the given name.static ValueCountAggregationBuilder
count(java.lang.String name)
Create a newValueCount
aggregation with the given name.static DateHistogramAggregationBuilder
dateHistogram(java.lang.String name)
Create a newDateHistogramAggregationBuilder
aggregation with the given name.static DateRangeAggregationBuilder
dateRange(java.lang.String name)
Create a newDateRangeAggregationBuilder
aggregation with the given name.static DiversifiedAggregationBuilder
diversifiedSampler(java.lang.String name)
Create a newSampler
aggregation with the given name.static ExtendedStatsAggregationBuilder
extendedStats(java.lang.String name)
Create a newExtendedStats
aggregation with the given name.static FilterAggregationBuilder
filter(java.lang.String name, QueryBuilder filter)
Create a newFilter
aggregation with the given name.static FiltersAggregationBuilder
filters(java.lang.String name, QueryBuilder... filters)
Create a newFilters
aggregation with the given name.static FiltersAggregationBuilder
filters(java.lang.String name, FiltersAggregator.KeyedFilter... filters)
Create a newFilters
aggregation with the given name.static GeoBoundsAggregationBuilder
geoBounds(java.lang.String name)
Create a newGeoBounds
aggregation with the given name.static GeoCentroidAggregationBuilder
geoCentroid(java.lang.String name)
Create a newGeoCentroid
aggregation with the given name.static GeoDistanceAggregationBuilder
geoDistance(java.lang.String name, GeoPoint origin)
Create a newGeoDistance
aggregation with the given name.static GeoGridAggregationBuilder
geohashGrid(java.lang.String name)
Create a newGeoHashGrid
aggregation with the given name.static GlobalAggregationBuilder
global(java.lang.String name)
Create a newGlobal
aggregation with the given name.static HistogramAggregationBuilder
histogram(java.lang.String name)
Create a newHistogram
aggregation with the given name.static IpRangeAggregationBuilder
ipRange(java.lang.String name)
Create a newIpRangeAggregationBuilder
aggregation with the given name.static MaxAggregationBuilder
max(java.lang.String name)
Create a newMax
aggregation with the given name.static MedianAbsoluteDeviationAggregationBuilder
medianAbsoluteDeviation(java.lang.String name)
Create a newMedianAbsoluteDeviation
aggregation with the given namestatic MinAggregationBuilder
min(java.lang.String name)
Create a newMin
aggregation with the given name.static MissingAggregationBuilder
missing(java.lang.String name)
Create a newMissing
aggregation with the given name.static NestedAggregationBuilder
nested(java.lang.String name, java.lang.String path)
Create a newNested
aggregation with the given name.static PercentileRanksAggregationBuilder
percentileRanks(java.lang.String name, double[] values)
Create a newPercentileRanks
aggregation with the given name.static PercentilesAggregationBuilder
percentiles(java.lang.String name)
Create a newPercentiles
aggregation with the given name.static RangeAggregationBuilder
range(java.lang.String name)
Create a newRange
aggregation with the given name.static ReverseNestedAggregationBuilder
reverseNested(java.lang.String name)
Create a newReverseNested
aggregation with the given name.static SamplerAggregationBuilder
sampler(java.lang.String name)
Create a newSampler
aggregation with the given name.static ScriptedMetricAggregationBuilder
scriptedMetric(java.lang.String name)
Create a newScriptedMetric
aggregation with the given name.static SignificantTermsAggregationBuilder
significantTerms(java.lang.String name)
Create a newSignificantTerms
aggregation with the given name.static SignificantTextAggregationBuilder
significantText(java.lang.String name, java.lang.String fieldName)
Create a newSignificantTextAggregationBuilder
aggregation with the given name and text field namestatic StatsAggregationBuilder
stats(java.lang.String name)
Create a newStats
aggregation with the given name.static SumAggregationBuilder
sum(java.lang.String name)
Create a newSum
aggregation with the given name.static TermsAggregationBuilder
terms(java.lang.String name)
Create a newTerms
aggregation with the given name.static TopHitsAggregationBuilder
topHits(java.lang.String name)
Create a newTopHits
aggregation with the given name.static WeightedAvgAggregationBuilder
weightedAvg(java.lang.String name)
Create a newAvg
aggregation with the given name.
-
-
-
Method Detail
-
count
public static ValueCountAggregationBuilder count(java.lang.String name)
Create a newValueCount
aggregation with the given name.
-
avg
public static AvgAggregationBuilder avg(java.lang.String name)
Create a newAvg
aggregation with the given name.
-
weightedAvg
public static WeightedAvgAggregationBuilder weightedAvg(java.lang.String name)
Create a newAvg
aggregation with the given name.
-
max
public static MaxAggregationBuilder max(java.lang.String name)
Create a newMax
aggregation with the given name.
-
min
public static MinAggregationBuilder min(java.lang.String name)
Create a newMin
aggregation with the given name.
-
sum
public static SumAggregationBuilder sum(java.lang.String name)
Create a newSum
aggregation with the given name.
-
stats
public static StatsAggregationBuilder stats(java.lang.String name)
Create a newStats
aggregation with the given name.
-
extendedStats
public static ExtendedStatsAggregationBuilder extendedStats(java.lang.String name)
Create a newExtendedStats
aggregation with the given name.
-
filter
public static FilterAggregationBuilder filter(java.lang.String name, QueryBuilder filter)
Create a newFilter
aggregation with the given name.
-
filters
public static FiltersAggregationBuilder filters(java.lang.String name, FiltersAggregator.KeyedFilter... filters)
Create a newFilters
aggregation with the given name.
-
filters
public static FiltersAggregationBuilder filters(java.lang.String name, QueryBuilder... filters)
Create a newFilters
aggregation with the given name.
-
adjacencyMatrix
public static AdjacencyMatrixAggregationBuilder adjacencyMatrix(java.lang.String name, java.util.Map<java.lang.String,QueryBuilder> filters)
Create a newAdjacencyMatrix
aggregation 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 newAdjacencyMatrix
aggregation with the given name and separator
-
sampler
public static SamplerAggregationBuilder sampler(java.lang.String name)
Create a newSampler
aggregation with the given name.
-
diversifiedSampler
public static DiversifiedAggregationBuilder diversifiedSampler(java.lang.String name)
Create a newSampler
aggregation with the given name.
-
global
public static GlobalAggregationBuilder global(java.lang.String name)
Create a newGlobal
aggregation with the given name.
-
missing
public static MissingAggregationBuilder missing(java.lang.String name)
Create a newMissing
aggregation with the given name.
-
nested
public static NestedAggregationBuilder nested(java.lang.String name, java.lang.String path)
Create a newNested
aggregation with the given name.
-
reverseNested
public static ReverseNestedAggregationBuilder reverseNested(java.lang.String name)
Create a newReverseNested
aggregation with the given name.
-
geoDistance
public static GeoDistanceAggregationBuilder geoDistance(java.lang.String name, GeoPoint origin)
Create a newGeoDistance
aggregation with the given name.
-
histogram
public static HistogramAggregationBuilder histogram(java.lang.String name)
Create a newHistogram
aggregation with the given name.
-
geohashGrid
public static GeoGridAggregationBuilder geohashGrid(java.lang.String name)
Create a newGeoHashGrid
aggregation with the given name.
-
significantTerms
public static SignificantTermsAggregationBuilder significantTerms(java.lang.String name)
Create a newSignificantTerms
aggregation with the given name.
-
significantText
public static SignificantTextAggregationBuilder significantText(java.lang.String name, java.lang.String fieldName)
Create a newSignificantTextAggregationBuilder
aggregation with the given name and text field name
-
dateHistogram
public static DateHistogramAggregationBuilder dateHistogram(java.lang.String name)
Create a newDateHistogramAggregationBuilder
aggregation with the given name.
-
range
public static RangeAggregationBuilder range(java.lang.String name)
Create a newRange
aggregation with the given name.
-
dateRange
public static DateRangeAggregationBuilder dateRange(java.lang.String name)
Create a newDateRangeAggregationBuilder
aggregation with the given name.
-
ipRange
public static IpRangeAggregationBuilder ipRange(java.lang.String name)
Create a newIpRangeAggregationBuilder
aggregation with the given name.
-
terms
public static TermsAggregationBuilder terms(java.lang.String name)
Create a newTerms
aggregation with the given name.
-
percentiles
public static PercentilesAggregationBuilder percentiles(java.lang.String name)
Create a newPercentiles
aggregation with the given name.
-
percentileRanks
public static PercentileRanksAggregationBuilder percentileRanks(java.lang.String name, double[] values)
Create a newPercentileRanks
aggregation with the given name.
-
medianAbsoluteDeviation
public static MedianAbsoluteDeviationAggregationBuilder medianAbsoluteDeviation(java.lang.String name)
Create a newMedianAbsoluteDeviation
aggregation with the given name
-
cardinality
public static CardinalityAggregationBuilder cardinality(java.lang.String name)
Create a newCardinality
aggregation with the given name.
-
topHits
public static TopHitsAggregationBuilder topHits(java.lang.String name)
Create a newTopHits
aggregation with the given name.
-
geoBounds
public static GeoBoundsAggregationBuilder geoBounds(java.lang.String name)
Create a newGeoBounds
aggregation with the given name.
-
geoCentroid
public static GeoCentroidAggregationBuilder geoCentroid(java.lang.String name)
Create a newGeoCentroid
aggregation with the given name.
-
scriptedMetric
public static ScriptedMetricAggregationBuilder scriptedMetric(java.lang.String name)
Create a newScriptedMetric
aggregation with the given name.
-
composite
public static CompositeAggregationBuilder composite(java.lang.String name, java.util.List<CompositeValuesSourceBuilder<?>> sources)
Create a newCompositeAggregationBuilder
aggregation with the given name.
-
-