Created
September 14, 2016 21:00
-
-
Save aaronhelton/4c2ac869480ccb78a1b744b5984f3430 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
{ | |
"size": 0, | |
"aggs": { | |
"filtered": { | |
"filter": { | |
"nested": { | |
"path" : "votes", | |
"query": { | |
"bool": { | |
"must": [{ | |
"match": {"votes.country": "CHINA"} | |
}] | |
} | |
} | |
} | |
}, | |
"aggs": { | |
"root": { | |
"terms": { | |
"field": "body", | |
"min_doc_count": 5, | |
"shard_size": 10, | |
"size": 200 | |
}, | |
"aggs": { | |
"order": { | |
"terms": { | |
"field": "session" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment