I would like to know how term Aggregation in elasticsearch work internally whether it brings all the documents in the memory and create the buckets for unique values ?
Th