Skip to content

Commit ff6ffe8

Browse files
srensambladorpolyfractal
authored andcommitted
Improved Terms Aggregation documentation (#38892)
Added a note after the first query example talking about fielddata.
1 parent 0b627b4 commit ff6ffe8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/reference/aggregations/bucket/terms-aggregation.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ GET /_search
5959
{
6060
"aggs" : {
6161
"genres" : {
62-
"terms" : { "field" : "genre" }
62+
"terms" : { "field" : "genre" } <1>
6363
}
6464
}
6565
}
6666
--------------------------------------------------
6767
// CONSOLE
6868
// TEST[s/_search/_search\?filter_path=aggregations/]
69+
<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
70+
<<fielddata, fielddata>>.
6971

7072
Response:
7173

0 commit comments

Comments
 (0)