我正在尝试使用 Nest C# 重新索引 2695140 个文档。我需要计算重新索引所有文档(我已为其编写日志)所需的时间。但运行 1 分钟后,我的代码返回无效响应(失败),但文档已正确索引,因为我们触发了弹性搜索的重新索引 Endint。
我希望我的代码应该等到重新索引操作完成,以便我可以计算重新索引所需的总时间。下面是我正在使用的代码
return await Client.ReindexOnServerAsync(selector => selector
.Source(src => src
.Index(_config.SomeIndex))
.Destination(dest => dest
.Index(newIndexName).OpType(OpType.Index))
.WaitForCompletion(true));
Run Code Online (Sandbox Code Playgroud)
提前致谢。