How can I filter with multiple condition in aggregation bucket?

For the aggs filter, use a bool query with a filter array which contains the 2 terms query.
The same way you did it within the function score.

1 Like