Skip to content

Update defaults for terms agg's shard min doc count #70664

@nik9000

Description

@nik9000

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions