# Corrent use of numeric type Long without losing precision

**URL:** <https://discuss.elastic.co/t/corrent-use-of-numeric-type-long-without-losing-precision/236774>\
**Category:** Elasticsearch\
**Created:** [June 11, 2020, 7:01pm UTC](https://discuss.elastic.co/t/corrent-use-of-numeric-type-long-without-losing-precision/236774 "2020-06-11T19:01:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmu](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mmu](https://discuss.elastic.co/u/mmu)\
**Post date:** [June 11, 2020, 7:01pm UTC](https://discuss.elastic.co/t/corrent-use-of-numeric-type-long-without-losing-precision/236774/1 "2020-06-11T19:01:12Z")

</div>

What is the correct use of the numeric datatype long? It seems that there are some pitfalls with values greater than +/- 2^53. (see [https://stackoverflow.com/questions/38952262/elasticsearch-max-length-of-mapping-type-long/38952540#38952540](https://stackoverflow.com/questions/38952262/elasticsearch-max-length-of-mapping-type-long/38952540#38952540))

How can I avoid the truncation to lower precision when storing them in ES or using them in ES queries? E.g. will quotation of numeric values have any effect?

---

<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:** [July 9, 2020, 7:01pm UTC](https://discuss.elastic.co/t/corrent-use-of-numeric-type-long-without-losing-precision/236774/2 "2020-07-09T19:01:13Z")

</div>

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