Created
October 20, 2014 19:03
-
-
Save cphoover/d7e8e6200d34a195645d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query = | |
GET /products/product/_search | |
{ | |
"query": { | |
"match_all" : {} | |
}, | |
"aggs" : { | |
"group_by_scode" : { | |
"terms" : { | |
"field" : "SCODE" | |
} | |
} | |
} | |
} | |
Results = | |
"hits" : … | |
"aggregations": { | |
"group_by_scode": { | |
"buckets": [ | |
{ | |
"key": 1240069, | |
"doc_count": 5 | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment