Detecting if an index is refreshing

While indexing our product catalog, we set the RefreshInterval to -1, as long as we are bulk updating the index.

When we are done, we set it back to 1 second.

After that, I would like to poll the index to see when it is done "refreshing" the index, so that I can safely swap the alias from the old index to the new index, without any issues.

Is there a way to do that?

Why not calling actually _refresh endpoint?

Is that a synchronous call? So it will not return until refresh is completed?

Yes it is.

My only concern would be, what if it takes a long time to complete the refresh? The call might time out, and then I'd have to trigger a new refresh, which might just make it worse?

Did you give it a try? Should not take that long IMHO.

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