In Elasticsearch.NET 6.x, it is possible create an index using IElasticClient
method:
var response = elasticClient.Create(
"my-index-name",
index => index .Mappings(
ms => ms.Map<MyDocumentType>(
x => x.AutoMap()
)
)
);
Method is removed in Elasticsearch.NET version 7.