{
"aggregations": {
"categories": {
"nested": {
"path": "categories"
},
"aggregations": {
"translated": {
"terms": {
"field": "categories.nl.raw",
"min_doc_count": 0
}
}
}
},
"target_audiences": {
"nested": {
"path": "target_audiences"
},
"aggregations": {
"translated": {
"terms": {
"field": "target_audiences.nl.raw",
"min_doc_count": 0
}
}
}
}
},
"query": {
"bool": {
"must": {
"match_all": {}
},
"minimum_should_match": 0,
"should": [{
"nested": {
"path": "target_audiences",
"query": {
"terms": {
"target_audiences.nl.raw": ["Doelgroep 2"]
}
}
}
}]
}
},
"post_filter": {
"bool": {
"must": [{
"nested": {
"path": "target_audiences",
"query": {
"terms": {
"target_audiences.nl.raw": ["Doelgroep 2"]
}
}
}
}]
}
}
}
Filters work on the results (because of the post_filter I guess?), but now none of the aggregations are filtered by eachother. I'm still doing something wrong in the "should" I guess?