Created
March 18, 2015 21:19
-
-
Save mwdchang/067c64097589d6983ed3 to your computer and use it in GitHub Desktop.
elasticsearch aggregation query
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, | |
"aggregations": { | |
"toplevel": { | |
"terms": { | |
"field": "_mutation_id", | |
"size": 10000 | |
}, | |
"aggs": { | |
"donor_distrubtion": { | |
"nested": { | |
"path": "ssm_occurrence" | |
}, | |
"aggs": { | |
"set_distribution": { | |
"filters": { | |
"filters": { | |
"set1": { | |
"terms": { | |
"ssm_occurrence.donor._donor_id": [ | |
"DO330", | |
"DO284", | |
"DO138" | |
] | |
} | |
}, | |
"set2": { | |
"terms": { | |
"ssm_occurrence.donor._donor_id": [ | |
"DO46443", | |
"DO44832", | |
"DO877" | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment