Jianghan vor 1 Jahr
Ursprung
Commit
0c17face82
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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())
 			}