From 8096f66377bde50f4bb074c8b43997fd9d11b0fb Mon Sep 17 00:00:00 2001 From: Robin Soenen Date: Wed, 29 Jan 2025 21:19:49 +0100 Subject: [PATCH] Update CrudExamplesTests.cs Small change in the documentation: var response = await client.IndexAsync(tweet, "my-tweet-index"); // <2> To var response = await client.IndexAsync(tweet, (IndexName)"my-tweet-index"); // <2> in order to avoid an ambiguous call: error CS0121: The call is ambiguous between the following methods or properties: 'ElasticsearchClient.IndexAsync(TDocument, IndexName, CancellationToken)' and 'ElasticsearchClient.IndexAsync(TDocument, Id?, CancellationToken)' --- tests/Tests/Documentation/Usage/CrudExamplesTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs index 032882c4c6b..6cbe5e87e47 100644 --- a/tests/Tests/Documentation/Usage/CrudExamplesTests.cs +++ b/tests/Tests/Documentation/Usage/CrudExamplesTests.cs @@ -56,7 +56,7 @@ public async Task IndexingADocument() Message = "Trying out the client, so far so good?" }; -var response = await client.IndexAsync(tweet, "my-tweet-index"); // <2> +var response = await client.IndexAsync(tweet, (IndexName)"my-tweet-index"); // <2> if (response.IsValidResponse) // <3> {