From ca834085428aa17fe9ef586210e44df325718cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Cifuentes=20Garc=C3=ADa?= <33845232+srensamblador@users.noreply.github.com> Date: Tue, 5 Mar 2019 16:17:01 +0100 Subject: [PATCH] Improved Terms Aggregation documentation (#38892) Added a note after the first query example talking about fielddata. --- docs/reference/aggregations/bucket/terms-aggregation.asciidoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc index 8c0e586d8b2..8db3c6b59ee 100644 --- a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc @@ -59,13 +59,15 @@ GET /_search { "aggs" : { "genres" : { - "terms" : { "field" : "genre" } + "terms" : { "field" : "genre" } <1> } } } -------------------------------------------------- // CONSOLE // TEST[s/_search/_search\?filter_path=aggregations/] +<1> `terms` aggregation should be a field of type `keyword` or any other data type suitable for bucket aggregations. In order to use it with `text` you will need to enable +<>. Response: