# Why graylog convert my INT to String

**URL:** <https://community.graylog.org/t/why-graylog-convert-my-int-to-string/25915>\
**Category:** Graylog Central (peer support)\
**Created:** [September 26, 2022, 4:19pm UTC](https://community.graylog.org/t/why-graylog-convert-my-int-to-string/25915 "2022-09-26T16:19:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tmacgbay](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/tmacgbay/32/3878_2.png) [@tmacgbay](https://community.graylog.org/u/tmacgbay)\
**Post date:** [September 26, 2022, 7:52pm UTC](https://community.graylog.org/t/why-graylog-convert-my-int-to-string/25915/2 "2022-09-26T19:52:43Z")

</div>

ElasticSearch will guess at they type of field at the creation of each Index, I am reasonably sure that OpenSearch is the same. If you rotate the index, it will choose type anew… so if you are forcing a long, it should capture as a long on the creation of the next index.

Assuming that works, It is possible to correct a field to a long historically if you want… Here is a [write up](https://community.graylog.org/t/custom-mappings-and-historical-correction/21130/5) for an older version but it likely can be used in OpenSearch with a little tweaking.

---

_[View the full topic](https://community.graylog.org/t/why-graylog-convert-my-int-to-string/25915)._
