Skip to content

BulkAsync using BulkRequest: Unknown value for refresh: [True]. #8546

Closed
@nickflynk

Description

@nickflynk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions