# Overriding (removing) alias in higher-order index template

**URL:** <https://discuss.elastic.co/t/overriding-removing-alias-in-higher-order-index-template/157395>\
**Category:** Elasticsearch\
**Created:** [November 19, 2018, 4:16pm UTC](https://discuss.elastic.co/t/overriding-removing-alias-in-higher-order-index-template/157395 "2018-11-19T16:16:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmb/32/14312_2.png) [@jmb](https://discuss.elastic.co/u/jmb)\
**Post date:** [November 19, 2018, 4:16pm UTC](https://discuss.elastic.co/t/overriding-removing-alias-in-higher-order-index-template/157395/1 "2018-11-19T16:16:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 17, 2018, 4:16pm UTC](https://discuss.elastic.co/t/overriding-removing-alias-in-higher-order-index-template/157395/2 "2018-12-17T16:16:53Z")

</div>

Closed on December 17, 2018, 4:16pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
