# Some values in the field is String, some is Integer, though Mapping is Integer

**URL:** <https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253>\
**Category:** Elasticsearch\
**Created:** [September 13, 2022, 7:05am UTC](https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253 "2022-09-13T07:05:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Soni1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_soni1/32/108968_2.png) [@Abhishek\_Soni1](https://discuss.elastic.co/u/Abhishek_Soni1)\
**Post date:** [September 13, 2022, 7:05am UTC](https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253/1 "2022-09-13T07:05:34Z")

</div>

I have created a schema config, where I have mapped "Total Number of Changes" field to "Integer". But I can see the values are both number, and string. I have also tried re-indexing but results are same.  
How can I deal with this issue, as results are getting wrong due to this. Any help will be much appreciated.

Result Sample : "Total Number of Changes" : "203", "Total Number of Changes" : 0,

Schema  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/6/46da329a3cf4899cf2209dd512b24459dc0b76ce.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 13, 2022, 7:22am UTC](https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253/2 "2022-09-13T07:22:56Z")

</div>

Elasticsearch sends you back what you sent.

If you sent it as a String it's returned as is.

---

<div class="post-metadata">

**Author:** ![Abhishek\_Soni1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_soni1/32/108968_2.png) [@Abhishek\_Soni1](https://discuss.elastic.co/u/Abhishek_Soni1)\
**Post date:** [September 13, 2022, 7:52am UTC](https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253/4 "2022-09-13T07:52:17Z")

</div>

Thanks @dadoonet for the prompt reply 🙂 you saved my day. Thanks a lot

---

<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:** [October 11, 2022, 7:52am UTC](https://discuss.elastic.co/t/some-values-in-the-field-is-string-some-is-integer-though-mapping-is-integer/314253/5 "2022-10-11T07:52:26Z")

</div>

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