In recent versions of ElasticSearch, the terms aggregation only
returns the buckets with the most documents. For use cases like this,
where we want to get statistics on every bucket, the documentation
recommends using the new composite aggregation instead, which doesn't
rank the buckets, but does provide a pagination interface through the
after and after_key fields.
In recent versions of ElasticSearch, the
terms
aggregation only returns the buckets with the most documents. For use cases like this, where we want to get statistics on every bucket, the documentation recommends using the newcomposite
aggregation instead, which doesn't rank the buckets, but does provide a pagination interface through theafter
andafter_key
fields.