Skip to content

Commit 8096f66

Browse files
authored
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)'
1 parent 7bc23f3 commit 8096f66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Tests/Documentation/Usage/CrudExamplesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public async Task IndexingADocument()
5656
Message = "Trying out the client, so far so good?"
5757
};
5858

59-
var response = await client.IndexAsync(tweet, "my-tweet-index"); // <2>
59+
var response = await client.IndexAsync(tweet, (IndexName)"my-tweet-index"); // <2>
6060

6161
if (response.IsValidResponse) // <3>
6262
{

0 commit comments

Comments
 (0)