# Integer Values Saved as Floats

**URL:** <https://discuss.elastic.co/t/integer-values-saved-as-floats/230445>\
**Category:** Elasticsearch\
**Created:** [April 29, 2020, 11:03pm UTC](https://discuss.elastic.co/t/integer-values-saved-as-floats/230445 "2020-04-29T23:03:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhenya](https://avatars.discourse-cdn.com/v4/letter/z/f14d63/32.png) [@Zhenya](https://discuss.elastic.co/u/Zhenya)\
**Post date:** [April 29, 2020, 11:03pm UTC](https://discuss.elastic.co/t/integer-values-saved-as-floats/230445/1 "2020-04-29T23:03:25Z")

</div>

I have Legacy application using Elasticsearch 5.6  
Tried to duplicate it and I see that on my copy integer fields (including `_id`) are saved as floats  
like

```auto
    curl --location --request GET 'http://localhost:9200/catalogsearch/_search'
   {
    "took": 10,
    "timed_out": false,
    "_shards": {
        "total": 5,
        "successful": 5,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": 2,
        "max_score": 1.0,
        "hits": [
            {
                "_index": "catalogsearch_2020-04-29-22-18-19",
                "_type": "product",
                "_id": "13.0",
                ...

```

Items are added with integer values but saved like that `13.0` above.  
Then when I want to delete by `_id = 13` it can't find the item  
I don't see any specific mapping instructions on any instance, but the difference exists ☹  
How can I make it save those values as integers?  
Thanks

---

<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:** [May 27, 2020, 11:13pm UTC](https://discuss.elastic.co/t/integer-values-saved-as-floats/230445/2 "2020-05-27T23:13:08Z")

</div>

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