# Handle big numbers in elasticsearch

**URL:** <https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535>\
**Category:** Kibana\
**Created:** [April 16, 2022, 4:10am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535 "2022-04-16T04:10:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![max4b](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@max4b](https://discuss.elastic.co/u/max4b)\
**Post date:** [April 16, 2022, 4:10am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/1 "2022-04-16T04:10:57Z")

</div>

Hi,

I need to store big ints that can have more than 20 numbers. I tried with long and double in the mappings for my numeric fields, but none of them work. I can't put them in text fields either, because that doesn't allow me to treat them as numerical values in Kibana.

Is there a way to store these values without errors and without loss of precision, and to be able to process them as numerical values in Kibana?

Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 16, 2022, 4:30am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/2 "2022-04-16T04:30:45Z")

</div>

Unsigned Long?

> **[Unsigned long field type | Elasticsearch Guide \[8.1\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/unsigned-long.html)**

---

<div class="post-metadata">

**Author:** ![max4b](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@max4b](https://discuss.elastic.co/u/max4b)\
**Post date:** [April 16, 2022, 4:46am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/3 "2022-04-16T04:46:36Z")

</div>

Thanks but I need to handle numbers with **more than** 20 figures, it can be 30 figure numbers so unsigned long so it doesn't fit. Are there any other ways ?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 16, 2022, 4:51am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/4 "2022-04-16T04:51:38Z")

</div>

You can use `keyword`... You can sort, compare and range I believe but you can not do math.

Perhaps someone else will have a suggestion.

Ohh and BTW @max4b Welcome to the community.

---

<div class="post-metadata">

**Author:** ![max4b](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@max4b](https://discuss.elastic.co/u/max4b)\
**Post date:** [April 17, 2022, 6:34am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/5 "2022-04-17T06:34:31Z")

</div>

This is what I use for the moment, but it is limiting because I would need to perform algebraic operations on the fields, or even just group them by interval, and it isn't possible with keywords. Thanks for the welcome !

---

<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 15, 2022, 6:34am UTC](https://discuss.elastic.co/t/handle-big-numbers-in-elasticsearch/302535/6 "2022-05-15T06:34:52Z")

</div>

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