示例#1
0
        /// <summary> 删除标准,同时删除索引 </summary>
        public void DeleteStandards(string data)
        {
            var ids = data.JsonTo <List <int> >();

            if (ids == null || ids.Count < 1)
            {
                return;
            }
            var iiids = new List <string>();

            foreach (var id in ids)
            {
                var resourcekey = "勘探知识库\\标准规范\\外部链接\\" + id;
                iiids.Add(resourcekey.ToMD5());
            }
            var count = _indexService.Delete(iiids);

            if (count != null && count.Length > 0)
            {
                standardService.RemoveStandards(ids);
            }
            else
            {
                //删除失败
            }
        }
        public void DeleteInstance(int id)
        {
            kCaseInputService.DeleteInstance(id);
            var list        = new List <string>();
            var resourcekey = "勘探知识库\\知识案例\\" + id;

            list.Add(resourcekey.ToMD5());
            _indexService.Delete(list);
        }
示例#3
0
        public bool DeleteEsRecord(string iiid)
        {
            var result = _indexerService.Delete(new List <string>()
            {
                iiid
            });

            //todo 删除Mongodb相关记录
            return(true);
        }
示例#4
0
 private void DeleteIndexer(int id)
 {
     _indexerService.Delete(id);
 }