From 65184d0b5b5661c2d44ed8fb79b89c8ab53839e3 Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Thu, 25 Jan 2018 08:59:41 +0100 Subject: [PATCH] Adds a note in the `terms` aggregation docs regarding pagination (#28360) This change adds a note in the `terms` aggregation that explains how to retrieve **all** terms (or all combinations of terms in a nested agg) using the `composite` aggregation. --- .../reference/aggregations/bucket/terms-aggregation.asciidoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc index e768cb0b295..1c739c40996 100644 --- a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc @@ -114,6 +114,11 @@ This means that if the number of unique terms is greater than `size`, the return (it could be that the term counts are slightly off and it could even be that a term that should have been in the top size buckets was not returned). +NOTE: If you want to retrieve **all** terms or all combinations of terms in a nested `terms` aggregation + you should use the <> aggregation which + allows to paginate over all possible terms rather than setting a size greater than the cardinality of the field in the + `terms` aggregation. The `terms` aggregation is meant to return the `top` terms and does not allow pagination. + [[search-aggregations-bucket-terms-aggregation-approximate-counts]] ==== Document counts are approximate