Closed
Description
In #9359 we discussed the possibility of extending the action.auto_create_index
setting to automatically recognise index names which match templates, and to allow those to be auto-created without having to maintain both the template and the setting.
In FixitFriday we came up with a better solution:
- Remove the
action.auto_create_index
setting - Add an
auto_create_index
setting to index templates - if true, then an index can be auto-created - Ship with a default match
*
index withauto_create_index: true
- this can be overridden by the user - If multiple templates match, the
auto_create_index
setting is merged just like all other template settings - the highestorder
wins
When upgrading, the user will see an exception if they set action.auto_create_index
and will need to update their templates to reflect the same logic.
Possibly, we could add a deprecation period where the action.auto_create_index
setting continues to work, but also accepts a _template
value which switches to use the template-based logic instead.