【发布时间】:2019-07-01 21:07:35
【问题描述】:
在 Elasticsearch.NET 6.x 中,可以使用IElasticClient 方法检查索引是否存在:
bool exists = elasticClient.IndexExists("my-index-name").Exists;
方法在 Elasticsearch.NET 版本 7 中被删除。
【问题讨论】:
在 Elasticsearch.NET 6.x 中,可以使用IElasticClient 方法检查索引是否存在:
bool exists = elasticClient.IndexExists("my-index-name").Exists;
方法在 Elasticsearch.NET 版本 7 中被删除。
【问题讨论】:
在 Elasticsearch.NET 版本 7 中,与索引操作相关的方法已移至 IndicesNamespace,因此 IndexExists 方法已移至:
bool exists = elasticClient.Indices.Exists("my-index-name").Exists;
同样,不同的方法已移至:
【讨论】: