Docs: Update example aggs to use dynamic keyword field

The getting started docs use dynamic mappings. With the recent change to
string split into text and keyword, text lost the default ability to do
aggs. This was added back in #17188. This change updates the getting
started examples to use the keyword multi field added to dynamically
mapped text fields.

closes #17941
This commit is contained in:
Ryan Ernst 2016-04-22 16:34:15 -07:00
parent 9ae723d516
commit 034adeb947
1 changed files with 3 additions and 3 deletions

View File

@ -904,7 +904,7 @@ curl -XPOST 'localhost:9200/bank/_search?pretty' -d '
"aggs": { "aggs": {
"group_by_state": { "group_by_state": {
"terms": { "terms": {
"field": "state" "field": "state.keyword"
} }
} }
} }
@ -979,7 +979,7 @@ curl -XPOST 'localhost:9200/bank/_search?pretty' -d '
"aggs": { "aggs": {
"group_by_state": { "group_by_state": {
"terms": { "terms": {
"field": "state" "field": "state.keyword"
}, },
"aggs": { "aggs": {
"average_balance": { "average_balance": {
@ -1005,7 +1005,7 @@ curl -XPOST 'localhost:9200/bank/_search?pretty' -d '
"aggs": { "aggs": {
"group_by_state": { "group_by_state": {
"terms": { "terms": {
"field": "state", "field": "state.keyword",
"order": { "order": {
"average_balance": "desc" "average_balance": "desc"
} }