Hello. Here is my problem:
I have query to get data for specific vendorCode in specific range - lines 3-13.
Than I want to get aggregations on videoViews for all data vendor have - lines 14-18
Than I need to create two buckets - "Channel One" and "Channel Two". Those two buckets should "include" only contentIds that are stated in list of "include" filter: line 23 and line 37.
The last thing I need to do is to calculate videoViews for each CHANNEL NAME. But what I got here (line 26-30) is calculating videoViews for each CONTENT ID instead.
How can I get videoViews total FOR EACH CHANNEL INSTEAD of for each content id in this channel?
**Without changing mapping, adding scripts or adding channel name fields to ES index