Skip to content

Commit 4615e72

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

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
@@ -61,13 +61,15 @@ GET /_search
6161
{
6262
"aggs" : {
6363
"genres" : {
64-
"terms" : { "field" : "genre" }
64+
"terms" : { "field" : "genre" } <1>
6565
}
6666
}
6767
}
6868
--------------------------------------------------
6969
// CONSOLE
7070
// TEST[s/_search/_search\?filter_path=aggregations/]
71+
<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
72+
<<fielddata, fielddata>>.
7173

7274
Response:
7375

0 commit comments

Comments
 (0)