How to confirm document has been indexed and posted?


(Esha) #1

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!


(David Pilato) #2

?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


(system) #3

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