Jianghan 1 an în urmă
părinte
comite
0c17face82
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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())
 			}