Skip to content

Commit cb1423d

Browse files
committed
[Docs] Add Aggregations list to the high-level client documentation (#26025)
1 parent 6e5c34f commit cb1423d

File tree

5 files changed

+88
-1
lines changed

5 files changed

+88
-1
lines changed

docs/Versions.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ifeval::["{release-state}"=="unreleased"]
3434
:painless-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/painless/lang-painless/{version}-SNAPSHOT
3535
:parent-join-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}-SNAPSHOT
3636
:percolator-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}-SNAPSHOT
37+
:matrixstats-client-javadoc: https://snapshots.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}-SNAPSHOT
3738
endif::[]
3839

3940
ifeval::["{release-state}"!="unreleased"]
@@ -45,6 +46,7 @@ ifeval::["{release-state}"!="unreleased"]
4546
:painless-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/painless/lang-painless/{version}
4647
:parent-join-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/parent-join-client/{version}
4748
:percolator-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/percolator-client/{version}
49+
:matrixstats-client-javadoc: https://artifacts.elastic.co/javadoc/org/elasticsearch/plugin/aggs-matrix-stats-client/{version}
4850
endif::[]
4951

5052
///////
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[[java-rest-high-aggregations]]
2+
=== Building Aggregations
3+
4+
This page lists all the available aggregations with their corresponding `AggregationBuilder` class name and helper method name in the
5+
`AggregationBuilders` or `PipelineAggregatorBuilders` utility classes.
6+
7+
:agg-ref: {elasticsearch-javadoc}/org/elasticsearch/search/aggregations
8+
:parentjoin-ref: {parent-join-client-javadoc}/org/elasticsearch/join/aggregations
9+
:matrixstats-ref: {matrixstats-client-javadoc}/org/elasticsearch/search/aggregations
10+
11+
==== Metrics Aggregations
12+
[options="header"]
13+
|======
14+
| Aggregation | AggregationBuilder Class | Method in AggregationBuilders
15+
| {ref}/search-aggregations-metrics-avg-aggregation.html[Avg] | {agg-ref}/metrics/avg/AvgAggregationBuilder.html[AvgAggregationBuilder] | {agg-ref}/AggregationBuilders.html#avg-java.lang.String-[AggregationBuilders.avg()]
16+
| {ref}/search-aggregations-metrics-cardinality-aggregation.html[Cardinality] | {agg-ref}/metrics/cardinality/CardinalityAggregationBuilder.html[CardinalityAggregationBuilder] | {agg-ref}/AggregationBuilders.html#cardinality-java.lang.String-[AggregationBuilders.cardinality()]
17+
| {ref}/search-aggregations-metrics-extendedstats-aggregation.html[Extended Stats] | {agg-ref}/metrics/stats/extended/ExtendedStatsAggregationBuilder.html[ExtendedStatsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#extendedStats-java.lang.String-[AggregationBuilders.extendedStats()]
18+
| {ref}/search-aggregations-metrics-geobounds-aggregation.html[Geo Bounds] | {agg-ref}/metrics/geobounds/GeoBoundsAggregationBuilder.html[GeoBoundsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#geoBounds-java.lang.String-[AggregationBuilders.geoBounds()]
19+
| {ref}/search-aggregations-metrics-geocentroid-aggregation.html[Geo Centroid] | {agg-ref}/metrics/geocentroid/GeoCentroidAggregationBuilder.html[GeoCentroidAggregationBuilder] | {agg-ref}/AggregationBuilders.html#geoCentroid-java.lang.String-[AggregationBuilders.geoCentroid()]
20+
| {ref}/search-aggregations-metrics-max-aggregation.html[Max] | {agg-ref}/metrics/max/MaxAggregationBuilder.html[MaxAggregationBuilder] | {agg-ref}/AggregationBuilders.html#max-java.lang.String-[AggregationBuilders.max()]
21+
| {ref}/search-aggregations-metrics-min-aggregation.html[Min] | {agg-ref}/metrics/min/MinAggregationBuilder.html[MinxAggregationBuilder] | {agg-ref}/AggregationBuilders.html#min-java.lang.String-[AggregationBuilders.min()]
22+
| {ref}/search-aggregations-metrics-percentile-aggregation.html[Percentiles] | {agg-ref}/metrics/percentiles/PercentilesAggregationBuilder.html[PercentilesAggregationBuilder] | {agg-ref}/AggregationBuilders.html#percentiles-java.lang.String-[AggregationBuilders.percentiles()]
23+
| {ref}/search-aggregations-metrics-percentile-rank-aggregation.html[Percentile Ranks] | {agg-ref}/metrics/percentiles/PercentileRanksAggregationBuilder.html[PercentileRanksAggregationBuilder] | {agg-ref}/AggregationBuilders.html#percentileRanks-java.lang.String-[AggregationBuilders.percentileRanks()]
24+
| {ref}/search-aggregations-metrics-scripted-metric-aggregation.html[Scripted Metric] | {agg-ref}/metrics/scripted/ScriptedMetricAggregationBuilder.html[ScriptedMetricAggregationBuilder] | {agg-ref}/AggregationBuilders.html#scriptedMetric-java.lang.String-[AggregationBuilders.scriptedMetric()]
25+
| {ref}/search-aggregations-metrics-stats-aggregation.html[Stats] | {agg-ref}/metrics/stats/StatsAggregationBuilder.html[StatsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#stats-java.lang.String-[AggregationBuilders.stats()]
26+
| {ref}/search-aggregations-metrics-sum-aggregation.html[Sum] | {agg-ref}/metrics/sum/SumAggregationBuilder.html[SumAggregationBuilder] | {agg-ref}/AggregationBuilders.html#sum-java.lang.String-[AggregationBuilders.sum()]
27+
| {ref}/search-aggregations-metrics-top-hits-aggregation.html[Top hits] | {agg-ref}/metrics/tophits/TopHitsAggregationBuilder.html[TopHitsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#topHits-java.lang.String-[AggregationBuilders.topHits()]
28+
| {ref}/search-aggregations-metrics-valuecount-aggregation.html[Value Count] | {agg-ref}/metrics/valuecount/ValueCountAggregationBuilder.html[ValueCountAggregationBuilder] | {agg-ref}/AggregationBuilders.html#count-java.lang.String-[AggregationBuilders.count()]
29+
|======
30+
31+
==== Bucket Aggregations
32+
[options="header"]
33+
|======
34+
| Aggregation | AggregationBuilder Class | Method in AggregationBuilders
35+
| {ref}/search-aggregations-bucket-adjacency-matrix-aggregation.html[Adjacency Matrix] | {agg-ref}/bucket/adjacency/AdjacencyMatrixAggregationBuilder.html[AdjacencyMatrixAggregationBuilder] | {agg-ref}/AggregationBuilders.html#adjacencyMatrix-java.lang.String-java.util.Map-[AggregationBuilders.adjacencyMatrix()]
36+
| {ref}/search-aggregations-bucket-children-aggregation.html[Children] | {parentjoin-ref}/ChildrenAggregationBuilder.html[ChildrenAggregationBuilder] |
37+
| {ref}/search-aggregations-bucket-datehistogram-aggregation.html[Date Histogram] | {agg-ref}/bucket/histogram/DateHistogramAggregationBuilder.html[DateHistogramAggregationBuilder] | {agg-ref}/AggregationBuilders.html#dateHistogram-java.lang.String-[AggregationBuilders.dateHistogram()]
38+
| {ref}/search-aggregations-bucket-daterange-aggregation.html[Date Range] | {agg-ref}/bucket/range/DateRangeAggregationBuilder.html[DateRangeAggregationBuilder] | {agg-ref}/AggregationBuilders.html#dateRange-java.lang.String-[AggregationBuilders.dateRange()]
39+
| {ref}/search-aggregations-bucket-diversified-sampler-aggregation.html[Diversified Sampler] | {agg-ref}/bucket/sampler/DiversifiedAggregationBuilder.html[DiversifiedAggregationBuilder] | {agg-ref}/AggregationBuilders.html#diversifiedSampler-java.lang.String-[AggregationBuilders.diversifiedSampler()]
40+
| {ref}/search-aggregations-bucket-filter-aggregation.html[Filter] | {agg-ref}/bucket/filter/FilterAggregationBuilder.html[FilterAggregationBuilder] | {agg-ref}/AggregationBuilders.html#filter-java.lang.String-org.elasticsearch.index.query.QueryBuilder-[AggregationBuilders.filter()]
41+
| {ref}/search-aggregations-bucket-filters-aggregation.html[Filters] | {agg-ref}/bucket/filters/FiltersAggregationBuilder.html[FiltersAggregationBuilder] | {agg-ref}/AggregationBuilders.html#filters-java.lang.String-org.elasticsearch.index.query.QueryBuilder...-[AggregationBuilders.filters()]
42+
| {ref}/search-aggregations-bucket-geodistance-aggregation.html[Geo Distance] | {agg-ref}/bucket/range/GeoDistanceAggregationBuilder.html[GeoDistanceAggregationBuilder] | {agg-ref}/AggregationBuilders.html#geoDistance-java.lang.String-org.elasticsearch.common.geo.GeoPoint-[AggregationBuilders.geoDistance()]
43+
| {ref}/search-aggregations-bucket-geohashgrid-aggregation.html[GeoHash Grid] | {agg-ref}/bucket/geogrid/GeoGridAggregationBuilder.html[GeoGridAggregationBuilder] | {agg-ref}/AggregationBuilders.html#geohashGrid-java.lang.String-[AggregationBuilders.geohashGrid()]
44+
| {ref}/search-aggregations-bucket-global-aggregation.html[Global] | {agg-ref}/bucket/global/GlobalAggregationBuilder.html[GlobalAggregationBuilder] | {agg-ref}/AggregationBuilders.html#global-java.lang.String-[AggregationBuilders.global()]
45+
| {ref}/search-aggregations-bucket-histogram-aggregation.html[Histogram] | {agg-ref}/bucket/histogram/HistogramAggregationBuilder.html[HistogramAggregationBuilder] | {agg-ref}/AggregationBuilders.html#histogram-java.lang.String-[AggregationBuilders.histogram()]
46+
| {ref}/search-aggregations-bucket-iprange-aggregation.html[IP Range] | {agg-ref}/bucket/range/IpRangeAggregationBuilder.html[IpRangeAggregationBuilder] | {agg-ref}/AggregationBuilders.html#ipRange-java.lang.String-[AggregationBuilders.ipRange()]
47+
| {ref}/search-aggregations-bucket-missing-aggregation.html[Missing] | {agg-ref}/bucket/missing/MissingAggregationBuilder.html[MissingAggregationBuilder] | {agg-ref}/AggregationBuilders.html#missing-java.lang.String-[AggregationBuilders.missing()]
48+
| {ref}/search-aggregations-bucket-nested-aggregation.html[Nested] | {agg-ref}/bucket/nested/NestedAggregationBuilder.html[NestedAggregationBuilder] | {agg-ref}/AggregationBuilders.html#nested-java.lang.String-java.lang.String-[AggregationBuilders.nested()]
49+
| {ref}/search-aggregations-bucket-range-aggregation.html[Range] | {agg-ref}/bucket/range/RangeAggregationBuilder.html[RangeAggregationBuilder] | {agg-ref}/AggregationBuilders.html#range-java.lang.String-[AggregationBuilders.range()]
50+
| {ref}/search-aggregations-bucket-reverse-nested-aggregation.html[Reverse nested] | {agg-ref}/bucket/nested/ReverseNestedAggregationBuilder.html[ReverseNestedAggregationBuilder] | {agg-ref}/AggregationBuilders.html#reverseNested-java.lang.String-[AggregationBuilders.reverseNested()]
51+
| {ref}/search-aggregations-bucket-sampler-aggregation.html[Sampler] | {agg-ref}/bucket/sampler/SamplerAggregationBuilder.html[SamplerAggregationBuilder] | {agg-ref}/AggregationBuilders.html#sampler-java.lang.String-[AggregationBuilders.sampler()]
52+
| {ref}/search-aggregations-bucket-significantterms-aggregation.html[Significant Terms] | {agg-ref}/bucket/significant/SignificantTermsAggregationBuilder.html[SignificantTermsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#significantTerms-java.lang.String-[AggregationBuilders.significantTerms()]
53+
| {ref}/search-aggregations-bucket-significanttext-aggregation.html[Significant Text] | {agg-ref}/bucket/significant/SignificantTextAggregationBuilder.html[SignificantTextAggregationBuilder] | {agg-ref}/AggregationBuilders.html#significantText-java.lang.String-java.lang.String-[AggregationBuilders.significantText()]
54+
| {ref}/search-aggregations-bucket-terms-aggregation.html[Terms] | {agg-ref}/bucket/terms/TermsAggregationBuilder.html[TermsAggregationBuilder] | {agg-ref}/AggregationBuilders.html#terms-java.lang.String-[AggregationBuilders.terms()]
55+
|======
56+
57+
==== Pipeline Aggregations
58+
[options="header"]
59+
|======
60+
| Pipeline on | PipelineAggregationBuilder Class | Method in PipelineAggregatorBuilders
61+
| {ref}/search-aggregations-pipeline-avg-bucket-aggregation.html[Avg Bucket] | {agg-ref}/pipeline/bucketmetrics/avg/AvgBucketPipelineAggregationBuilder.html[AvgBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#avgBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.avgBucket()]
62+
| {ref}/search-aggregations-pipeline-derivative-aggregation.html[Derivative] | {agg-ref}/pipeline/derivative/DerivativePipelineAggregationBuilder.html[DerivativePipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#derivative-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.derivative()]
63+
| {ref}/search-aggregations-pipeline-max-bucket-aggregation.html[Max Bucket] | {agg-ref}/pipeline/bucketmetrics/max/MaxBucketPipelineAggregationBuilder.html[MaxBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#maxBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.maxBucket()]
64+
| {ref}/search-aggregations-pipeline-min-bucket-aggregation.html[Min Bucket] | {agg-ref}/pipeline/bucketmetrics/min/MinBucketPipelineAggregationBuilder.html[MinBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#minBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.minBucket()]
65+
| {ref}/search-aggregations-pipeline-sum-bucket-aggregation.html[Sum Bucket] | {agg-ref}/pipeline/bucketmetrics/sum/SumBucketPipelineAggregationBuilder.html[SumBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#sumBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.sumBucket()]
66+
| {ref}/search-aggregations-pipeline-stats-bucket-aggregation.html[Stats Bucket] | {agg-ref}/pipeline/bucketmetrics/stats/StatsBucketPipelineAggregationBuilder.html[StatsBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#statsBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.statsBucket()]
67+
| {ref}/search-aggregations-pipeline-extended-stats-bucket-aggregation.html[Extended Stats Bucket] | {agg-ref}/pipeline/bucketmetrics/stats/extended/ExtendedStatsBucketPipelineAggregationBuilder.html[ExtendedStatsBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#extendedStatsBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.extendedStatsBucket()]
68+
| {ref}/search-aggregations-pipeline-percentiles-bucket-aggregation.html[Percentiles Bucket] | {agg-ref}/pipeline/bucketmetrics/percentile/PercentilesBucketPipelineAggregationBuilder.html[PercentilesBucketPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#percentilesBucket-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.percentilesBucket()]
69+
| {ref}/search-aggregations-pipeline-movavg-aggregation.html[Moving Average] | {agg-ref}/pipeline/movavg/MovAvgPipelineAggregationBuilder.html[MovAvgPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#movingAvg-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.movingAvg()]
70+
| {ref}/search-aggregations-pipeline-cumulative-sum-aggregation.html[Cumulative Sum] | {agg-ref}/pipeline/cumulativesum/CumulativeSumPipelineAggregationBuilder.html[CumulativeSumPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#cumulativeSum-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.cumulativeSum()]
71+
| {ref}/search-aggregations-pipeline-bucket-script-aggregation.html[Bucket Script] | {agg-ref}/pipeline/bucketscript/BucketScriptPipelineAggregationBuilder.html[BucketScriptPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#bucketScript-java.lang.String-java.util.Map-org.elasticsearch.script.Script-[PipelineAggregatorBuilders.bucketScript()]
72+
| {ref}/search-aggregations-pipeline-bucket-selector-aggregation.html[Bucket Selector] | {agg-ref}/pipeline/bucketselector/BucketSelectorPipelineAggregationBuilder.html[BucketSelectorPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#bucketSelector-java.lang.String-java.util.Map-org.elasticsearch.script.Script-[PipelineAggregatorBuilders.bucketSelector()]
73+
| {ref}/search-aggregations-pipeline-serialdiff-aggregation.html[Serial Differencing] | {agg-ref}/pipeline/serialdiff/SerialDiffPipelineAggregationBuilder.html[SerialDiffPipelineAggregationBuilder] | {agg-ref}/pipeline/PipelineAggregatorBuilders.html#diff-java.lang.String-java.lang.String-[PipelineAggregatorBuilders.diff()]
74+
|======
75+
76+
==== Matrix Aggregations
77+
[options="header"]
78+
|======
79+
| Aggregation | AggregationBuilder Class | Method in MatrixStatsAggregationBuilders
80+
| {ref}/search-aggregations-matrix-stats-aggregation.html[Matrix Stats] | {matrixstats-ref}/matrix/stats/MatrixStatsAggregationBuilder.html[MatrixStatsAggregationBuilder] | {matrixstats-ref}/MatrixStatsAggregationBuilders.html#matrixStats-java.lang.String-[MatrixStatsAggregationBuilders.matrixStats()]
81+
|======

docs/java-rest/high-level/apis/index.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ include::search.asciidoc[]
77
include::scroll.asciidoc[]
88
include::main.asciidoc[]
99
include::queries.asciidoc[]
10+
include::aggs.asciidoc[]

docs/java-rest/high-level/apis/queries.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[java-rest-high-search-queries]]
2-
=== Search Queries
2+
=== Building Search Queries
33

44
This page lists all the available search queries with their corresponding `QueryBuilder` class name and helper method name in the
55
`QueryBuilders` utility class.

docs/java-rest/high-level/apis/search.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ sub-aggregation on the average age of employees in the company:
190190
include-tagged::{doc-tests}/SearchDocumentationIT.java[search-request-aggregations]
191191
--------------------------------------------------
192192

193+
The <<java-rest-high-aggregations, Aggregations>> page gives a list of all available aggregations with
194+
their corresponding `AggregationBuilder` objects and `AggregationBuilders` helper methods.
195+
193196
We will later see how to <<java-rest-high-retrieve-aggs,access aggregations>> in the `SearchResponse`.
194197

195198
===== Requesting Suggestions

0 commit comments

Comments
 (0)