从弹性搜索中删除索引会导致禁止错误403

时间:2015-04-01 09:00:49

标签: nest elasticsearch

从Elastic Search中删除索引时,我收到HTTP错误:403。删除索引的代码如下:

static void DeleteIndex(string indexName)
    {
        // Delete index, recreate
        if (_client.IndexExists(desc => desc.Index(indexName)).Exists)
        {
            var response = _client.DeleteIndex(desc => desc.Index(indexName));
            if (!response.IsValid)
            {
                Console.WriteLine(response.ConnectionStatus);
                Console.WriteLine("Press any key to continue");
                Console.ReadKey();
            }
        }
    }

有关如何删除禁用错误的任何指示?

0 个答案:

没有答案