-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Which version of Elastic are you using?
[ ] elastic.v7 (for Elasticsearch 7.x)
Please describe the expected behavior
I am overriding the JSON decoder with a customer decoder
type JSONIterDecoder struct {}
func (d *JSONIterDecoder) Decode(data []byte, v interface{}) error {
return jsoniter.Unmarshal(data, v)
}And then adding it to the client
return elastic.NewSimpleClient(
elastic.SetURL(esUrl),
elastic.SetDecoder(&JSONIterDecoder{})
)I am expecting that the new decoder will be used for all processing with the client
Please describe the actual behavior
The flame-graphs generated from profiling show that v7.(*SearchService).Do is using jsoniter, however, v7.Aggregations.Terms and v7.Aggregations.TopHits are still using the encoding/json.
Are there further steps required to ensure that the decoder is replaced globally?
ats0stvAlexandreL0pes