Setting size to 0 was dangerous as it could lead to the bucket explosion problem. A good practice should be for users to have a rough idea how many buckets to expect and to specify a reasonable bound for it.
If you worry about imprecisions, have a look at this section:
Most of the time, end users won't look at the 99,999th term in an aggregation. They probably won't look at the 10,000th. Or even the 1,000th. You should consider what people are actually going to look at and use that as a bounds.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.