Aggregation of possibly added buckets

I need a functionality similar to shop filter, which shows the possible amount of added documents after the selection of one value in a filter. Example:
image
Each filter item is one bucket value of a field, which can be used for a query. Selection of items from different filters, creates a bool must query between two fields. I am able to get the basic count of documents with simple aggregation, when there is no query. I am unable to create a aggregation, which would show all possible buckets, that would be added, if item was added to the query.
Is there any feature/example/plugin that can be used to find possible added buckets?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.