Skip to content

Instantly share code, notes, and snippets.

@xenji
Last active August 29, 2015 14:03
Show Gist options
  • Save xenji/a99342d3cfc5864ad6e4 to your computer and use it in GitHub Desktop.
Save xenji/a99342d3cfc5864ad6e4 to your computer and use it in GitHub Desktop.
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"browser_distribution": {
"terms": {
"field": "browser"
},
"aggs": {
"version_distribution": {
"terms": {
"field": "browser_version"
}
}
}
},
"browser_overall_count": {
"value_count": {
"field": "browser"
}
}
}
}
{
"took": 16,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 6,
"max_score": 0,
"hits": []
},
"aggregations": {
"browser_distribution": {
"buckets": [
{
"key": "chrome",
"doc_count": 3,
"version_distribution": {
"buckets": [
{
"key": "35.0.1916.153",
"doc_count": 3
}
]
}
},
{
"key": "safari",
"doc_count": 2,
"version_distribution": {
"buckets": [
{
"key": "5.1.3",
"doc_count": 2
}
]
}
},
{
"key": "firefox",
"doc_count": 1,
"version_distribution": {
"buckets": [
{
"key": "27.0",
"doc_count": 1
}
]
}
}
]
},
"browser_overall_count": {
"value": 6
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment