When running:
ubqResponse = ElasticClient.UpdateByQuery(u => u
.Type("entity")
.Index(IndexName)
.Query(q => ubqquery)
.WaitForCompletion(false)
.Slices(ubqslices)
.Script(script => script.Source(ubqscript).Params(ubqparams)));
I then attempt to get the task that should have been created by:
var currentTask = ubqResponse.Task;
var status = ElasticClient.GetTask(currentTask);
However ocasionally whenever I try to get the task I get the following error in code and in Kibana:
{
"error": {
"root_cause": [
{
"type": "resource_not_found_exception",
"reason": "task [WKeOw_8eShy-Fvk6lFCWWA:6047942] isn't running and hasn't stored its results"
}
],
"type": "resource_not_found_exception",
"reason": "task [WKeOw_8eShy-Fvk6lFCWWA:6047942] isn't running and hasn't stored its results"
},
"status": 404
}
When breakpointing and retrying the Update_By_Query with the same properties it works fine.