I'm trying to reindex 2695140 documents, using Nest C#. I need to calculate how much time it taken to reindex all the documents, for which I've written the logs. But after running for 1 minute, my code is returning an invalid response (Failed) but the documents are getting indexed properly as we have triggered Reindex endoint of elastic search.
I would want my code should wait until the reindex operation is completed so that I can calculate the total time taken to reindex. Below is the code I'm using
return await Client.ReindexOnServerAsync(selector => selector
.Source(src => src
.Index(_config.SomeIndex))
.Destination(dest => dest
.Index(newIndexName).OpType(OpType.Index))
.WaitForCompletion(true));
Thanks in advance.