Jianghan hai 1 ano
pai
achega
0c17face82
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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())
 			}