Checking if an index refresh is pending?

If I load a lot of data into elasticsearch and query it, the data is not there until a refresh runs.

How can I check if a refresh is in progress or due before running the query?

You cannot, you either need to call a refresh or just wait.

1 Like