Let’s say that each document in my ES index has following fields:
ASIN, name, referenceNumber, videoViews, timeWatched
There can be many documents with the same ASIN fields.
I’m doing teams aggregation, that aggregate documents in my ES cluster based on ASIN field.
This Aggregation counts sum of videoViews and sum of timeWatched for each ASIN bucket.
ElasticSearch returns aggregation response where ASIN - a key for each bucket, and sum of timeWatched and sum ofvideoViews are values for this key.
My simple question is how to make aggregation return name and referenceNumber as well? If I know that documents with same ASIN will have same name and referenceNumber?