Closed
Description
Elastic.Clients.Elasticsearch version: 9.0.4
Elasticsearch version: 9.0.0
.NET runtime version: net8.0
Description of the problem, including expected versus actual behavior:
Trying to send a bulk request with the Refresh field throws an error "Unknown value for refresh: [True]". Looks like some kind of serialization issue.
Code:
var operations = docs
.Select<ProductDocument, IBulkOperation>(productDocument => new BulkUpdateOperation<ProductDocument, ProductDocument>(productDocument, productDocument, true)
{
Index = indexName,
})
.ToList();
var request = new BulkRequest(indexName)
{
Refresh = Refresh.True,
Operations = operations
};
var bulkResponse = await client.BulkAsync(request);