Open yansklyarenko opened 1 year ago
I saw this bug and I believe the same issue is the reason for the bug that I logged recently: https://github.com/elastic/elasticsearch-net/issues/8001 Thank you very much for the provided workaround!
Bug still present in v8.12 of the client.
Are there any fixes coming soon?
Elastic.Clients.Elasticsearch version: 8.11.0
Elasticsearch version: 8.2.2
.NET runtime version: net7.0
Operating system version: Windows 10
Description of the problem including expected versus actual behavior: Prerequisites: there's an index "my-test-index" containing a document with id equals "1".
Consider the following code:
The call to BulkAsync fails with the following exception:
As soon as the code is changed the following way (the index name IS NOT set for BulkRequest, but instead IS set for each BulkDeleteOperation):
It starts working just fine. So, the workaround is to mandatory specify the index for each bulk delete operation. This is not reproducible for bulk index operation, but IS reproducible if the bulk request contains AT LEAST ONE bulk delete operation. Specifying the index name on both levels doesn't help either.
Notes: I should say that the suggestion in the error message about using default index name in the settings is not relevant - in my app each BulkRequest might target a different index.