How does Elasticsearch assemble the aggregations? During a search a list of hits are produced for each shard (if I'm understanding how it works). Are the hits for each shard aggregated at that time and then merged later, similar to how hits are merged by the coordinating node?
Thanks