Overriding (removing) alias in higher-order index template

(James Beckett) #1

When creating index templates, we can use order to override elements of one template with another; it doesn't seem able to handle the case where a lower-order template has specified an alias, but in the higher-order template I want to specify a different one - and have new indices not added to the alias already given in the lower order template.

For example, where I want to reindex some data in my-index-* as e.g. my-index-testcase-xxxx, keeping the same mappings (or only augmenting, changing settings etc) from the my-index template (requiring the index names to match the lower-order template pattern) but keeping the results out of the usual alias. I always end up creating the new indices as e.g. testcase-my-index-* and a completely separate template, risking divergence, which seems like it should be avoidable.

Aliases are given in a template as ... alias-name: {} but the natural thought of overriding by giving ... alias-name: null, other-alias-name: {} gives the error:

"type": "illegal_argument_exception",
"reason": "No alias is specified"

Perhaps alias removal could be implemented using a null there, if it has no reasonable other meaning?