You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Regarding naming, I have always used {name}_SETTING, and while I do see quite a few settings begging with SETTING_, I think these are the minority, and I have not seen recent settings being added with this convention.
Regarding location, I think this is similar to #19878. For the same reasons there, I am going to close this. Having an issue has not been a driving factor in increasing the priority of such a refactoring.
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
orWAIT_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 inIndexMetaData
, 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 inFieldMapper#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?The text was updated successfully, but these errors were encountered: