【发布时间】:2019-10-29 22:05:25
【问题描述】:
我正在将我的 NEST 版本从 6.8 升级到 7.1。由于它是主要版本升级,我正在经历一些重大变化。
其中一项重大更改是使用 Reindex API。在 NEST 6.8 的早期,我曾经像这样重新索引:
var req = new JObject
{
{ "source", new JObject
{
{ "index", "sourceIndexName" }
}
},
{ "dest", new JObject
{
{ "index", "destIndexName" }
}
}
};
var postDataRequest = JsonConvert.SerializeObject(jsonReindexReq, defaultJsonSerializerSettings);
var response = await elasticSearchClient.LowLevel.ReindexAsync<StringResponse>(postDataRequest, null, cancellationToken);
我现在如何使用 NEST 7.1 做到这一点?
我看到新 SDK 中存在 14 种不同风格的 reindex api,但我无法在网上找到任何示例。
【问题讨论】:
标签: c# elasticsearch nest aws-elasticsearch