运行时:
ubqResponse = ElasticClient.UpdateByQuery(u => u
.Type("entity")
.Index(IndexName)
.Query(q => ubqquery)
.WaitForCompletion(false)
.Slices(ubqslices)
.Script(script => script.Source(ubqscript).Params(ubqparams)));
然后,我尝试获取应该由以下人员创建的任务:
var currentTask = ubqResponse.Task;
var status = ElasticClient.GetTask(currentTask);
无论如何,每次尝试执行任务时,在代码和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
}
断点并使用相同的属性重试Update_By_Query时,效果很好。