# How to be sure that all documents indexed?

**URL:** <https://discuss.elastic.co/t/how-to-be-sure-that-all-documents-indexed/171543>\
**Category:** Elasticsearch\
**Created:** [March 8, 2019, 6:16pm UTC](https://discuss.elastic.co/t/how-to-be-sure-that-all-documents-indexed/171543 "2019-03-08T18:16:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matchish](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@matchish](https://discuss.elastic.co/u/matchish)\
**Post date:** [March 8, 2019, 6:16pm UTC](https://discuss.elastic.co/t/how-to-be-sure-that-all-documents-indexed/171543/1 "2019-03-08T18:16:21Z")

</div>

I have a question about [Index Aliases and Zero Downtime](https://www.elastic.co/guide/en/elasticsearch/guide/current/index-aliases.html)  
When we put a document to an index it takes time until document available for search.

How to check that all documents available for search before switching from old to a new index?

---

<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:** [March 8, 2019, 6:51pm UTC](https://discuss.elastic.co/t/how-to-be-sure-that-all-documents-indexed/171543/2 "2019-03-08T18:51:36Z")

</div>

You can ensure that documents are available for search by [refreshing](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/indices-refresh.html) the index. But if you want to know if the document will _eventually_ be available then you can just look at the response to your indexing request: if successful, the documents were accepted.

---

<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:** [April 5, 2019, 7:03pm UTC](https://discuss.elastic.co/t/how-to-be-sure-that-all-documents-indexed/171543/3 "2019-04-05T19:03:49Z")

</div>

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