尝试给上报到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

View File

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

BIN
tunas

Binary file not shown.