Jianghan 1 年之前
父节点
当前提交
0c17face82
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      esv7/elasticutil.go

+ 1 - 1
esv7/elasticutil.go

@@ -664,7 +664,7 @@ func UpdateNew(index string, obj ...interface{}) bool {
 			if tempObj == nil || len(*tempObj) == 0 {
 				continue
 			}
-			_id := fmt.Sprint((*tempObj)["_id"])
+			_id := fmt.Sprint((*tempObj)["id"])
 			if _id != "" {
 				client.Delete().Index(index).Id(_id).Do(context.TODO())
 			}