Created
September 17, 2015 03:15
-
-
Save sahas-/f5de1407036967958b8c 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
GET simpleindex/games/_search | |
{ | |
"query": { | |
"nested": { | |
"path": "continents", | |
"query": { | |
"match": { | |
"continents.name": "south" | |
} | |
} | |
} | |
}, | |
"aggs": { | |
"continents": { | |
"nested": { | |
"path": "continents" | |
}, | |
"aggs": { | |
"countries": { | |
"nested": { | |
"path": "continents.countries" | |
}, | |
"aggs": { | |
"states": { | |
"nested": { | |
"path": "continents.countries.states" | |
}, | |
"aggs": { | |
"avg_wins": { | |
"avg": { | |
"field": "continents.countries.states.wins" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment