我需要保存一些數(shù)據(jù),其中包含一個(gè)名為 ID 的字段,這是一個(gè)使用 golang 和Olivere彈性搜索包的uuid im這是我的代碼type Space struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"`}做了一些轉(zhuǎn)換后 js := string(data) // upto this place there is no error or warnings ind, err := esclient.Index(). Index(Type). BodyJson(js). Do(ctx)這是它拋出的錯(cuò)誤無(wú)法在 ID 為“gPmI8HIBCIO6Ejb-Y51D”的文檔中解析類型為 [long] 的字段 [id]。字段值預(yù)覽:'a5c723c5-1f6e-457f-9556-47b7ebcfd183'
無(wú)法在彈性搜索中保存 uuid
繁星點(diǎn)點(diǎn)滴滴
2022-06-13 15:37:31