Filtered Terms aggregation with list of values to include in each bucket

I have Java Map, where key is some Channel Name and values are List of contentIDs, that belongs to this Channels. Basically, each channel bucket has list of content ids.
In ES I do not store channels names, only contentIDs and some other fields.
So what I want is to create query, that will return aggregated data for each of this channel buckets.
I will have maximum of 30 channels (if it matter).
I am not sure if it is possible.
What I want ES to return is list of buckets, the name of the buckets will be my ChannelName, this bucket will include aggregated metrics for list of contentIDs that belongs to this ChannelName bucket.

I tried to do it using term aggregation with include filter. And list my content ids in “include”. But it won’t work. So I am wondering, if it possible to do this?

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