Check if Elasticsearch has finished indexing Check if Elasticsearch has finished indexing elasticsearch elasticsearch

Check if Elasticsearch has finished indexing


I found this PR: https://github.com/elastic/elasticsearch/pull/17986

You can use refresh: wait_for and Elasticsearch will only respond once your data is available for search.


You can wait for the response; when you receive the response to the update request, it's done (and you won't see it in pending or current tasks). I think the problem you're having is probably with the refresh interval (see dynamic settings). Indexed documents are not available for search right away, and this is the (maximum) amount of time before they will be available. (You can change this setting for what makes sense for your use case, or use this setting to let you know how long you need to sleep before searching for the integration tests.)

If you want to see at in-progress tasks, you can use the tasks api.