尝试给上报到elasticsearch的文档加_id
This commit is contained in:
parent
8973ef16f6
commit
7aadf4b0b6
@ -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
BIN
tunas
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user