Skip to content

Inconsistent naming and location for index level settings #19723

Closed

Description

Currently, we find the index level settings all over the place, both in terms of the location (class) in which they are declared and naming conventions.

In terms of naming, a major source of inconsistency is whether to name the setting SETTING_{name} or {name}_SETTING (e.g. SETTING_WAIT_FOR_ACTIVE_SHARDS or WAIT_FOR_ACTIVE_SHARDS_SETTING). It would be good to settle on a convention for readability and consistency, and so we don't have to resort to discussions on every PR about what the proper name should be.

In terms of location, we have many index level settings in IndexSettings, many in IndexMetaData, then others scattered around in other places specific to the class that it is most associated with (e.g. index.mapping.coerce which is found in FieldMapper#COERCE_SETTING). It would be good to discuss if we are fine with this ad hoc approach to locating index settings, or if we want some more consistency, where should they all go? Should there be a dedicated constants class for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions