fix:删除不存在文档response.IsValid为false引起的异常
This commit is contained in:
parent
62ba69aed9
commit
148434dda0
@ -252,12 +252,9 @@ internal class TrackDetailsRepository : ElasticSearchContextAbstract<TrackDetail
|
||||
|
||||
foreach (var track in tracks)
|
||||
{
|
||||
var r = await Context.DeleteAsync<TrackDetailsIndex>(track.Id, u => u
|
||||
await Context.DeleteAsync<TrackDetailsIndex>(track.Id, u => u
|
||||
.Index(track.IndexName)
|
||||
);
|
||||
|
||||
if (!r.IsValid)
|
||||
throw new Exception($"轨迹数据删除失败,原因:{r.ServerError.Error}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user