elasticsearch-net icon indicating copy to clipboard operation
elasticsearch-net copied to clipboard

Update CrudExamplesTests.cs

Open RobinSoenen opened this issue 9 months ago • 2 comments
trafficstars

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)'

RobinSoenen avatar Jan 29 '25 20:01 RobinSoenen

💚 CLA has been signed

Contributor agreement signed in the meantime

RobinSoenen avatar Jan 29 '25 20:01 RobinSoenen