Description
Our index compatibility policy requires that indices created in major version n-1 continue to work in version n without manual intervention, which means we must be able to read index metadata that was valid in n-1. We haven't always followed this policy closely for index settings. It hasn't been a big problem in the past, perhaps because we archive all unknown and invalid settings when a node starts up. We plan to remove this leniency on start-up and would like to uphold clearer compatibility guarantees.
To support this, the behavior of index settings must be able to depend on the index version. That way if a setting value is deprecated in 7.x, we can reject it for new 8.x indices but continue to allow it for 7.x indices (maybe falling back to another value). Perhaps there should be a mechanism for validating settings that has access to the index version. Note this set-up would only be relevant to 'index scoped' settings, not Setting
objects in general.