public virtual async Task IndexExistsAsync()

in Elastic.SemanticKernel.Connectors.Elasticsearch/MockableElasticsearchClient.cs [98:119]


    public virtual async Task<bool> IndexExistsAsync(
        IndexName indexName,
        CancellationToken cancellationToken = default)
    {
        Verify.NotNull(indexName);

        var response = await ElasticsearchClient.Indices
            .ExistsAsync(
                new ExistsRequest(indexName)
                {
                    RequestConfiguration = CustomUserAgentRequestConfiguration
                },
                cancellationToken)
            .ConfigureAwait(false);

        if (!response.IsSuccess())
        {
            throw new TransportException(PipelineFailure.Unexpected, "Failed to execute request.", response);
        }

        return response.Exists;
    }