Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GET /_search
- {
- "query": {...},
- "aggs" : {
- "categories" : {
- "terms" : { "field" : "category_name" }
- }
- }
- }
- {
- ...
- "aggregations" : {
- "categories" : {
- "doc_count_error_upper_bound": 0,
- "sum_other_doc_count": 0,
- "buckets" : [
- {
- "key" : "Mobile phones",
- "doc_count" : 6
- },
- {
- "key" : "Batteries for phones",
- "doc_count" : 3
- },
- {
- "key" : "Cases for phones",
- "doc_count" : 2
- }
- ]
- }
- }
- }
Add Comment
Please, Sign In to add comment