3

In Elasticsearch.NET 6.x, it is possible to check if index exists using IElasticClient method:

    bool exists = elasticClient.IndexExists("my-index-name").Exists;

Method is removed in Elasticsearch.NET version 7.

Nenad
  • 24,809
  • 11
  • 75
  • 93

1 Answers1

12

In Elasticsearch.NET version 7 methods related to indices operations are moved into IndicesNamespace, so IndexExists method has been moved to:

    bool exists = elasticClient.Indices.Exists("my-index-name").Exists;

Similarly, different methods have been moved to:

  • Cat
  • Cluster
  • Graph
  • Sql
  • Nodes
  • etc...
Nenad
  • 24,809
  • 11
  • 75
  • 93