Improved Terms Aggregation documentation (#38892)

Added a note after the first query example talking about fielddata.
This commit is contained in:
Samuel Cifuentes García 2019-03-05 16:17:01 +01:00 committed by Zachary Tong
parent 160dc29f0e
commit ca83408542
1 changed files with 3 additions and 1 deletions

View File

@ -59,13 +59,15 @@ GET /_search
{ {
"aggs" : { "aggs" : {
"genres" : { "genres" : {
"terms" : { "field" : "genre" } "terms" : { "field" : "genre" } <1>
} }
} }
} }
-------------------------------------------------- --------------------------------------------------
// CONSOLE // CONSOLE
// TEST[s/_search/_search\?filter_path=aggregations/] // 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
<<fielddata, fielddata>>.
Response: Response: