Я хочу создать новую политику ролловера в elasti c search из моего основного приложения. net. Я могу создать новый индекс, используя ядро asp. net. Но я должен добавить новую политику ролловера из приложения. Можно ли добавить политику ролловера из основного приложения. net?
var node = new Uri(_elasticConfiguration.ElasticAPIUrl);
var settings = new ConnectionSettings(node);
settings.BasicAuthentication(_elasticConfiguration.ElasticUserName, _elasticConfiguration.ElasticPassword);
settings.ServerCertificateValidationCallback(CertificateValidations.AllowAll);
settings.DefaultFieldNameInferrer(f => f.ToString());
settings.DefaultIndex(_elasticConfiguration.ElasticIndex);
var client = new ElasticClient(settings);
if (!client.Indices.Exists(_elasticConfiguration.ElasticIndex).Exists)
{
var indexDescriptor = new CreateIndexDescriptor(_elasticConfiguration.ElasticIndex).Mappings(ms => ms.Map(new ExportDetails(), m => m.AutoMap()));
client.Indices.Create(_elasticConfiguration.ElasticIndex, i => indexDescriptor);
}
return client;