Right now shard_min_doc_count defaults to 0. But 0 here has a kind of funny meaning. See, usually we don't collect buckets for terms on a shard unless there are documents in them. Unless you set min_count_count to 0. If you set that to 0 then we respect that shard_min_doc_count of 0. But if you set min_doc_count to anything higher than 0 we tread shard_min_doc_count as though it had a default of 1. That's kind of confusing. Its generally what you want when you use the aggregation though.
This issue is about making the code less confusing. I'm not sure exactly how though. Especially with the transport client still being a thing in the 7.x branch. Maybe its safer to save this for 8.x so we can make changes without worrying about the transport client.
Right now
shard_min_doc_countdefaults to0. But0here has a kind of funny meaning. See, usually we don't collect buckets for terms on a shard unless there are documents in them. Unless you setmin_count_countto0. If you set that to0then we respect thatshard_min_doc_countof0. But if you setmin_doc_countto anything higher than0we treadshard_min_doc_countas though it had a default of1. That's kind of confusing. Its generally what you want when you use the aggregation though.This issue is about making the code less confusing. I'm not sure exactly how though. Especially with the transport client still being a thing in the 7.x branch. Maybe its safer to save this for 8.x so we can make changes without worrying about the transport client.