# Does Elasticsearch round the long values in documents?

**URL:** <https://discuss.elastic.co/t/does-elasticsearch-round-the-long-values-in-documents/77016>\
**Category:** Elasticsearch\
**Created:** [March 1, 2017, 4:04pm UTC](https://discuss.elastic.co/t/does-elasticsearch-round-the-long-values-in-documents/77016 "2017-03-01T16:04:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [March 1, 2017, 4:04pm UTC](https://discuss.elastic.co/t/does-elasticsearch-round-the-long-values-in-documents/77016/1 "2017-03-01T16:04:37Z")

</div>

I inserted the document in ES 2.4.0 :

```
 POST library/books/478749376728789638
    {
                   "bookId": 478749376728789638,
                    other fields...
    }

```

When i indexed the above document in the ES the response is like this

```
_index": "library",
            "_type": "books",
            "_id": "478749376728789638",
            "_score": 1,
            "_source": {
               "bookId": 478749376728789600,
                and other fields

```

So, when i searched the `bookId:478749376728789638`,it is not showing any results because the bookId is not actually present in ES.

And when i used `bookId:478749376728789638` value in excel it is converted to `bookId:478749376728789000`

I don't know why this is happening, because of these i am not getting accurate results from ES.

The mapping for this bookId is

```
 "bookId": {
                  "type": "long"
}

```

How can i able to avoid this?

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:** [March 29, 2017, 4:04pm UTC](https://discuss.elastic.co/t/does-elasticsearch-round-the-long-values-in-documents/77016/2 "2017-03-29T16:04:57Z")

</div>

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