# Kibana error displaying numbers in Discover

**URL:** <https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333>\
**Category:** Kibana\
**Created:** [December 11, 2018, 9:32am UTC](https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333 "2018-12-11T09:32:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@alessandro](https://discuss.elastic.co/u/alessandro)\
**Post date:** [December 11, 2018, 9:32am UTC](https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333/1 "2018-12-11T09:32:12Z")

</div>

Hi,

I have applied the suggested technique to prevent from duplicates creation in the Logstash output plugin for Elasticsearch, as described here: [https://www.elastic.co/blog/logstash-lessons-handling-duplicates](https://www.elastic.co/blog/logstash-lessons-handling-duplicates)

Basically I associate to the \_id field, the id field provided by the application generating the messages (id is the timestamp at nanotime):

output {  
elasticsearch {  
hosts =\> "host\_IP"  
document\_id =\> "%{[id]}"  
}  
}

Therefore I would expect to see in Kibana the same value for \_id and id.

This correct association happens in the most of the cases but sometimes I notice that, in the Kibana Discover view, the \_id field differs by 1 respect to the id field. Here is an example (in the Kibana index pattern \_id is type string and id is type number):

\_id= 11335773562862155 (correct value)  
id= 11,335,773,562,862,156 (wrong value)

Please note that I write correct or wrong above with respect to the original message being published to Kafka, before hitting the ELK stack.

Moreover if I search for this specific document filtering by id, I obtain a result only if I search for  
id = 11335773562862155. This induce me to think that the association from the Logstash plugin works as expected but somehow the value is not properly displayed by the Kibana interface.

Does anyone have an idea about the origin of this incorrect display in the Kibana Discover view? Is it some Javascript casting issue?

---

<div class="post-metadata">

**Author:** ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)\
**Post date:** [December 11, 2018, 10:15pm UTC](https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333/2 "2018-12-11T22:15:42Z")

</div>

Hi, this is a JavaScript issue with the size of your number, which exceeds the maximum safe integer value.

[http://2ality.com/2012/07/large-integers.html](http://2ality.com/2012/07/large-integers.html)

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/8/28eb519da35dddd944dcb1ae48d5bbe7610d712a.png)

Recommend to change the mappings for `id` field to string to make this field work with Kibana, or you can try changing the field format to String in Management \> Index Patterns.

---

<div class="post-metadata">

**Author:** ![alessandro](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@alessandro](https://discuss.elastic.co/u/alessandro)\
**Post date:** [December 12, 2018, 10:09am UTC](https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333/3 "2018-12-12T10:09:11Z")

</div>

Thanks for the quick reply jen-huang.

I have tried to change the field format to String in the Management view but it doesn't solve the problem.

I will consider if changing the **id** field mapping is necessary. At the moment this inconvenient only affect the display in Kibana for a field which is not so important to be visually inspected. The major requirement is to avoid duplicates and have the correct information stored in Elasticsearch for the sake of data quality.

---

<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:** [January 9, 2019, 10:22am UTC](https://discuss.elastic.co/t/kibana-error-displaying-numbers-in-discover/160333/4 "2019-01-09T10:22:23Z")

</div>

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