# Can I know that inserted data is consistent for all shards / nodes?

**URL:** <https://discuss.elastic.co/t/can-i-know-that-inserted-data-is-consistent-for-all-shards-nodes/158334>\
**Category:** Elasticsearch\
**Created:** [November 27, 2018, 11:57am UTC](https://discuss.elastic.co/t/can-i-know-that-inserted-data-is-consistent-for-all-shards-nodes/158334 "2018-11-27T11:57:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![genichm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/genichm/32/37566_2.png) [@genichm](https://discuss.elastic.co/u/genichm)\
**Post date:** [November 27, 2018, 11:57am UTC](https://discuss.elastic.co/t/can-i-know-that-inserted-data-is-consistent-for-all-shards-nodes/158334/1 "2018-11-27T11:57:02Z")

</div>

I want to make aggregations over inserted in Elasticsearch data but it means that inserted data should be consistent for all shards. Can I ensure consistency of inserted data or to know that data that was stored in ES become consistent? I don't need to make aggregations just after insertion and can wait for few minutes.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 27, 2018, 2:18pm UTC](https://discuss.elastic.co/t/can-i-know-that-inserted-data-is-consistent-for-all-shards-nodes/158334/2 "2018-11-27T14:18:35Z")

</div>

A **refresh** returns (successfully) once all previously-written data is exposed on all shards. You can either do this [explicitly as a separate step](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html) or else [include it with the indexing operation itself](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html).

---

<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:** [December 25, 2018, 2:18pm UTC](https://discuss.elastic.co/t/can-i-know-that-inserted-data-is-consistent-for-all-shards-nodes/158334/3 "2018-12-25T14:18:36Z")

</div>

Closed on December 25, 2018, 2:18pm UTC

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