ElasticSearch 7.1 删除索引 C# API
ElasticSearch 7.1 Delete Index C# API
我正在更新我的项目以从 v6.8 使用 ES & NEST v7.1,我想知道 IndicesDeleteAsync 的对应项 API。
Task<TResponse> IndicesDeleteAsync<TResponse>(string index, DeleteIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new();
lowLevelClient 7.1 中有一个删除索引的功能,但它需要 id
参数并删除一个文档。
Task<TResponse> DeleteAsync<TResponse>(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new();
我不想删除索引中的文档,我想删除整个索引。
如何在 v7.x 中执行此任务?
create 和 deleted 方法已移至 Indices 命名空间
var 响应=elasticClient.Indices.DeleteAsync("indexname");
请参阅 (elasticsearch-net/releases/tag/7.0.0)[https://github.com/elastic/elasticsearch-net/releases/tag/7.0.0] 中的 "Namespaced API methods and Upgrade Assistant" 以获取有关升级的帮助。
我正在更新我的项目以从 v6.8 使用 ES & NEST v7.1,我想知道 IndicesDeleteAsync 的对应项 API。
Task<TResponse> IndicesDeleteAsync<TResponse>(string index, DeleteIndexRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new();
lowLevelClient 7.1 中有一个删除索引的功能,但它需要 id
参数并删除一个文档。
Task<TResponse> DeleteAsync<TResponse>(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default(CancellationToken)) where TResponse : class, IElasticsearchResponse, new();
我不想删除索引中的文档,我想删除整个索引。
如何在 v7.x 中执行此任务?
create 和 deleted 方法已移至 Indices 命名空间
var 响应=elasticClient.Indices.DeleteAsync("indexname");
请参阅 (elasticsearch-net/releases/tag/7.0.0)[https://github.com/elastic/elasticsearch-net/releases/tag/7.0.0] 中的 "Namespaced API methods and Upgrade Assistant" 以获取有关升级的帮助。