# Why is the query result in Discover different from the real data?

**URL:** <https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059>\
**Category:** Kibana\
**Created:** [July 30, 2021, 9:10am UTC](https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059 "2021-07-30T09:10:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yyyayo](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@yyyayo](https://discuss.elastic.co/u/yyyayo)\
**Post date:** [July 30, 2021, 9:10am UTC](https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059/1 "2021-07-30T09:10:26Z")

</div>

When I tried to search a field equaling some value, I got the right result. However, the data showed in the result was different from the real or the searched one. It looked like this:

 ![difference](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b42972b51d5e7f7c3374226d0ca4a0a970deaeb7.png)

As I searched `n2_hash : -9181604705294914238`, the result showed `-9,181,604,705,294,914,560` in Table and `-9181604705294915000` in JSON. Why did this happen?

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [July 30, 2021, 11:05am UTC](https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059/2 "2021-07-30T11:05:30Z")

</div>

Hi @yyyayo

It could be related to a mix of field [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html) and field formatting settings in Kibana.  
You can check field mapping by going to `/app/management/data/index_management/indices` or via DevTools.  
You can change value formatting for Kibana by going to `/app/management/kibana/settings`

By adjusting Kibana settings and (if needed) disabling [coercion](https://www.elastic.co/guide/en/elasticsearch/reference/current/coerce.html) you should be able to fix it.

Regards, Dima

---

<div class="post-metadata">

**Author:** ![yyyayo](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@yyyayo](https://discuss.elastic.co/u/yyyayo)\
**Post date:** [August 5, 2021, 6:26am UTC](https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059/3 "2021-08-05T06:26:59Z")

</div>

Hi Dima,

Thanks for your answer. I disabled the coercion by specifying "coerce" as false in mappings, but it didn't work. The last three digits of the long integer are still wrong.

I attached two more examples.

![1](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d20b02ad00e55bb0064885b7187a0d8377891b15.png)

![2](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0c36d41d7de4940b3f8c3f18d29fc9965a6ad296.png)

Hope you could help me figure this out.

---

<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:** [September 2, 2021, 6:27am UTC](https://discuss.elastic.co/t/why-is-the-query-result-in-discover-different-from-the-real-data/280059/4 "2021-09-02T06:27:17Z")

</div>

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