Created
September 27, 2016 12:40
-
-
Save koryonik/732d08da2864675cf95a67216f2b8292 to your computer and use it in GitHub Desktop.
Filter Aggregation With Multiple terms
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": { | |
"agg_name": { | |
"filter" : { | |
"bool": { | |
"must": [ | |
{ | |
"term": { | |
"field1": "VALUE1" | |
} | |
}, | |
{ | |
"term": { | |
"field2": "VALUE2" | |
} | |
} | |
] | |
} | |
}, | |
"aggs" : { | |
"agg_name_filtered":{ | |
"terms": { | |
"size": 50, | |
"field": "fieldname", | |
"missing": "N/A" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment