in Elastic.SemanticKernel.Connectors.Elasticsearch/MockableElasticsearchClient.cs [129:153]
public virtual async Task CreateIndexAsync(
IndexName indexName,
Properties properties,
CancellationToken cancellationToken = default)
{
Verify.NotNull(indexName);
var response = await ElasticsearchClient.Indices
.CreateAsync(
new CreateIndexRequest(indexName)
{
Mappings = new TypeMapping
{
Properties = properties
},
RequestConfiguration = CustomUserAgentRequestConfiguration
},
cancellationToken)
.ConfigureAwait(false);
if (!response.IsSuccess())
{
throw new TransportException(PipelineFailure.Unexpected, "Failed to execute request.", response);
}
}