# Convert a field from string to IP type

**URL:** <https://discuss.elastic.co/t/convert-a-field-from-string-to-ip-type/293253>\
**Category:** Kibana\
**Created:** [December 31, 2021, 11:20am UTC](https://discuss.elastic.co/t/convert-a-field-from-string-to-ip-type/293253 "2021-12-31T11:20:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [December 31, 2021, 11:20am UTC](https://discuss.elastic.co/t/convert-a-field-from-string-to-ip-type/293253/1 "2021-12-31T11:20:58Z")

</div>

Hi,  
i need to Convert a field (client\_ip) from string to IP type.

I use ILM for the index.

It would be possible to change the field type on the next rollover? It doesn't matter that the previous indices are compromised.

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [January 21, 2022, 4:14am UTC](https://discuss.elastic.co/t/convert-a-field-from-string-to-ip-type/293253/2 "2022-01-21T04:14:44Z")

</div>

Hello @yago82

Are you using an index template? If so, you can update it and the new type will be reflected in new indices.

If you have further questions please mention the version of the stack you're running.

Thanks,  
Matt

---

<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:** [February 18, 2022, 4:15am UTC](https://discuss.elastic.co/t/convert-a-field-from-string-to-ip-type/293253/3 "2022-02-18T04:15:44Z")

</div>

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