# How to confirm document has been indexed and posted?

**URL:** <https://discuss.elastic.co/t/how-to-confirm-document-has-been-indexed-and-posted/72232>\
**Category:** Elasticsearch\
**Created:** [January 19, 2017, 9:55pm UTC](https://discuss.elastic.co/t/how-to-confirm-document-has-been-indexed-and-posted/72232 "2017-01-19T21:55:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edesai](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@edesai](https://discuss.elastic.co/u/edesai)\
**Post date:** [January 19, 2017, 9:55pm UTC](https://discuss.elastic.co/t/how-to-confirm-document-has-been-indexed-and-posted/72232/1 "2017-01-19T21:55:53Z")

</div>

Is there a recommended way to make sure the document has finished indexing? Relying on HTTP response 201 doesn't really make sure the document has been indexed entirely and may not be available for querying right away. I can write my own retry logic to keep trying to GET the document but I wanted to know if there is a better way. I have read on few blogs that while POSTing a document using "refresh" takes a toll on CPU usage.  
Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 20, 2017, 7:52am UTC](https://discuss.elastic.co/t/how-to-confirm-document-has-been-indexed-and-posted/72232/2 "2017-01-20T07:52:30Z")

</div>

`?refresh=wait_for` can help. See [https://www.elastic.co/guide/en/elasticsearch/reference/5.1/docs-refresh.html#\_literal\_refresh\_wait\_for\_literal\_can\_force\_a\_refresh](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/docs-refresh.html#_literal_refresh_wait_for_literal_can_force_a_refresh)

---

<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:** [February 17, 2017, 7:52am UTC](https://discuss.elastic.co/t/how-to-confirm-document-has-been-indexed-and-posted/72232/3 "2017-02-17T07:52:30Z")

</div>

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