From b7669d9db9c7273feacc877528bfc486dda8a2fd Mon Sep 17 00:00:00 2001 From: like Date: Wed, 1 Nov 2023 10:31:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20opensearch=E8=BF=9E=E6=8E=A5=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E7=B4=A2=E5=BC=95=E6=9F=A5=E8=AF=A2=5Fdoc=E7=9A=84id?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E8=BD=AC=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/alert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/alert.go b/src/service/alert.go index f41cb41..184fcac 100644 --- a/src/service/alert.go +++ b/src/service/alert.go @@ -686,7 +686,7 @@ func (a *AlertSvc) GetIndexMaxID(indexName ...string) (maxId int, err error) { aggregations := responseMap["aggregations"].(map[string]interface{}) maxIDAgg := aggregations["max_id"].(map[string]interface{}) maxIDValue := maxIDAgg["value"] - maxId = int(maxIDValue.(float64)) + maxId = cast.ToInt(maxIDValue) return maxId, nil } -- 2.26.0