# Aliases for 5 fields in 5 indices

**URL:** <https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175>\
**Category:** Kibana\
**Created:** [February 3, 2022, 10:25am UTC](https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175 "2022-02-03T10:25:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [February 3, 2022, 10:25am UTC](https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175/1 "2022-02-03T10:25:46Z")

</div>

Hi all,

I have 5 indices : ( indices `a1, a2, a3, a4, a5`) with 5 different fields : `Merchant_Id, Mer_Id, Merc_Id, MERCHANT_Id, MERCH_ID`.

For some reasons, I cannot delete or alter the field or data.

I want to create an alias data type so that in my visualization for Index pattern a\* for all indices, I want to use a common field `Merchant_Id` which shows all 5 fields `Merchant_Id, Mer_Id, Merc_Id, MERCHANT_Id, MERCH_ID`. in a single data column.

I've tried alias but it says cannot give alias for an already mapped field.

Any ideas or other turnarounds?

---

<div class="post-metadata">

**Author:** ![JLeysens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jleysens/32/67404_2.png) [@JLeysens](https://discuss.elastic.co/u/JLeysens)\
**Post date:** [February 3, 2022, 10:42am UTC](https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175/2 "2022-02-03T10:42:11Z")

</div>

Hi @Sandeep_Raju , not sure which version of the stack you're using, but this sounds like something you can achieve with runtime fields:

> **[Runtime fields | Elasticsearch Guide \[7.17\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html#runtime)**

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [February 3, 2022, 12:05pm UTC](https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175/3 "2022-02-03T12:05:34Z")

</div>

As the error says, if index contains "Merchant\_Id" field, you can't creat alias mappings of the same name. Does each index have only one of the 5 fields? If so, creat alias for that single field of indices which contains other than `Merchant_Id`.

If you indices contains mixture of the fields, I suppose runtime field is a good way as @JLeysens says.

Or [copy\_to paramter](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html) is also another option.

---

<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:** [March 3, 2022, 12:05pm UTC](https://discuss.elastic.co/t/aliases-for-5-fields-in-5-indices/296175/4 "2022-03-03T12:05:35Z")

</div>

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