Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nickflynk opened this issue May 29, 2025 · 2 comments · Fixed by #8549
Closed

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

nickflynk opened this issue May 29, 2025 · 2 comments · Fixed by #8549

Comments

@nickflynk
Copy link

nickflynk commented May 29, 2025

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

@nickflynk nickflynk added Category: Bug 9.x Relates to a 9.x client version labels May 29, 2025
@flobernd
Copy link
Member

Duplicate of #8545

Workaround: Downgrade to the patch version before the latest one.

@flobernd flobernd added Duplicate and removed Category: Bug 9.x Relates to a 9.x client version labels May 29, 2025
@flobernd
Copy link
Member

Fixed in 9.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants