Last active
November 16, 2016 06:25
-
-
Save arion/9525840 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
curl -XGET http://localhost:9200/store_development_products/_search -d ' | |
{ | |
"aggs": { | |
"category_ids": { | |
"terms": { | |
"field": "root_category_ids", | |
"size": 1000 | |
}, | |
"aggs" : { | |
"by_product_type": { | |
"terms": { | |
"field": "product_type", | |
"size": 4 | |
} | |
} | |
} | |
} | |
} | |
}' | |
# "aggregations" : { | |
# "category_ids": { | |
# "buckets" : [ | |
# { | |
# "key" : 1446, | |
# "doc_count" : 1018, | |
# "by_product_type" : { | |
# "buckets" : [ | |
# {"key":"chapter","doc_count":903}, | |
# {"key":"remix","doc_count":80}, | |
# {"key":"book","doc_count":35} | |
# ] | |
# } | |
# }, | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment