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