Detecting if an index is refreshing

(Morten Bock) #1

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?

(David Pilato) #2

Why not calling actually _refresh endpoint?

(Morten Bock) #3

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

(David Pilato) #4

Yes it is.

(Morten Bock) #5

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?

(David Pilato) #6

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

(system) #7

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