# The query results of Elasticsearch are less than the actual number of data when data in Elasticsearch update every 30s

**URL:** <https://discuss.elastic.co/t/the-query-results-of-elasticsearch-are-less-than-the-actual-number-of-data-when-data-in-elasticsearch-update-every-30s/146621>\
**Category:** Elasticsearch\
**Created:** [August 30, 2018, 5:37am UTC](https://discuss.elastic.co/t/the-query-results-of-elasticsearch-are-less-than-the-actual-number-of-data-when-data-in-elasticsearch-update-every-30s/146621 "2018-08-30T05:37:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![april](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@april](https://discuss.elastic.co/u/april)\
**Post date:** [August 30, 2018, 5:37am UTC](https://discuss.elastic.co/t/the-query-results-of-elasticsearch-are-less-than-the-actual-number-of-data-when-data-in-elasticsearch-update-every-30s/146621/1 "2018-08-30T05:37:07Z")

</div>

I am trying to use Grafana and display real time data in table. Grafana uses POST to obtain query results from Elasticsearch. While sometimes the number of acquired doc is less than the actual number. After several times refreshes the number of doc would be complete once while incomplete later. Why does it lack data in responses and not realize real time displaying. How can I obtain complete query results every 5s.

---

<div class="post-metadata">

**Author:** ![jaddison](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jaddison](https://discuss.elastic.co/u/jaddison)\
**Post date:** [September 10, 2018, 4:06am UTC](https://discuss.elastic.co/t/the-query-results-of-elasticsearch-are-less-than-the-actual-number-of-data-when-data-in-elasticsearch-update-every-30s/146621/2 "2018-09-10T04:06:45Z")

</div>

Perhaps this is due to your index refresh settings, like [`refresh_interval`](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html)? Also, read [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html) for additional doc refreshing info.

---

<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:** [October 8, 2018, 4:07am UTC](https://discuss.elastic.co/t/the-query-results-of-elasticsearch-are-less-than-the-actual-number-of-data-when-data-in-elasticsearch-update-every-30s/146621/3 "2018-10-08T04:07:01Z")

</div>

Closed on October 8, 2018, 4:07am UTC

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