尝试给上报到elasticsearch的文档加_id

This commit is contained in:
zhangkun 2024-12-04 11:13:41 +08:00
parent 8973ef16f6
commit 7aadf4b0b6
2 changed files with 3 additions and 2 deletions

@ -19,6 +19,7 @@ import (
)
type Candle struct {
Id string `json:"_id"`
core *Core
InstId string
Period string
@ -284,8 +285,8 @@ func (core *Core) SaveUniKey(period string, keyName string, extt time.Duration,
return
}
// did := cl.InstId + cl.Period + cl.Data[0].(string)
// cl.Id = did
did := cl.InstId + cl.Period + cl.Data[0].(string)
cl.Id = did
cl.ToStruct(core)
cd, _ := json.Marshal(cl)
wg := WriteLog{

BIN
tunas

Binary file not shown.