Skip to content

Instantly share code, notes, and snippets.

@bevans88
Created April 25, 2018 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bevans88/198398b2331a8414a4c132a62dc9a7cf to your computer and use it in GitHub Desktop.
Save bevans88/198398b2331a8414a4c132a62dc9a7cf to your computer and use it in GitHub Desktop.
{
"size": 0,
"aggregations": {
"firstNested": {
"nested": {
"path": "firstNested"
},
"aggregations": {
"firstNestedFilter": {
"filter": {
"match_all": {}
},
"aggregations": {
"secondNested": {
"nested": {
"path": "firstNested.secondNested"
},
"aggregations": {
"secondNestedNamesTerms": {
"terms": {
"field": "firstNested.secondNested.names.keyword"
},
"aggregations": {
"totalCount": {
"sum": {
"field": "firstNested.secondNested.count"
}
},
"totalSize": {
"sum": {
"field": "firstNested.secondNested.size"
}
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment