/// <summary> /// 批量删除 /// </summary> /// <param name="ids">Id</param> public virtual void Delete(string[] ids) { var esResult = EsClient.MultiGet(m => m.GetMany <T>(ids).Index(CurrentIndex)); if (esResult.Hits.Count <= 0) { return; } foreach (var esResultHits in esResult.Hits) { if (!esResultHits.Found) { continue; } EsClient.Delete <T>(esResultHits.Id, f => f.Index(CurrentIndex)); } EsClient.Indices.Refresh(CurrentIndex); }