Skip to content

Instantly share code, notes, and snippets.

@remeniuk
Created April 26, 2014 16:44
Show Gist options
  • Save remeniuk/11324838 to your computer and use it in GitHub Desktop.
Save remeniuk/11324838 to your computer and use it in GitHub Desktop.
Aggs
{
"size": 0,
"query" : {
"match" : {
"application" : "App"
}
},
"aggregations" : {
"by_login_date" : {
"date_histogram" : {
"field" : "logins_date",
"interval" : "day"
},
"aggregations" : {
"by_age" : {
"histogram" : {
"field" : "age",
"interval" : 10
},
"aggregations" : {
"by_country" : {
"terms" : {
"field" : "country"
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment