# Rename filed value with pattern

**URL:** <https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015>\
**Category:** Kibana\
**Created:** [May 14, 2021, 12:11pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015 "2021-05-14T12:11:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mik\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mik_a/32/78256_2.png) [@Mik\_a](https://discuss.elastic.co/u/Mik_a)\
**Post date:** [May 14, 2021, 12:11pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015/1 "2021-05-14T12:11:42Z")

</div>

I hear I can rename the value in index pattern, but I cannot find this. I can only change the type. eg. from number to string. Now I need to change value itself.  
eg. product\_shoes --\> shoes  
..and so on

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 14, 2021, 12:36pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015/2 "2021-05-14T12:36:05Z")

</div>

Hello,  
You can use the field alias datatype in the mapping:

> **[Alias field type | Elasticsearch Guide \[7.12\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/field-alias.html)**

---

<div class="post-metadata">

**Author:** ![Mik\_a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mik_a/32/78256_2.png) [@Mik\_a](https://discuss.elastic.co/u/Mik_a)\
**Post date:** [May 14, 2021, 12:42pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015/3 "2021-05-14T12:42:49Z")

</div>

Thanks. I actually found what I was looking for and that is Static lookup as field type

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 14, 2021, 1:08pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015/4 "2021-05-14T13:08:46Z")

</div>

Ah great, you wanted to change the values of a field inside a document, not the name of a field. Static lookup is indeed the answer. 🙂

---

<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:** [June 11, 2021, 1:09pm UTC](https://discuss.elastic.co/t/rename-filed-value-with-pattern/273015/5 "2021-06-11T13:09:35Z")

</div>

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