You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When decoding JSON, elastic by default uses `DefaultDecoder` which uses
`json.Unmarshal` behind the scenes.
This commit adds a `NumberDecoder` which uses `json.NewDecoder(...)` and
`json.UseNumber()` for use cases like those described in #891.
To switch to `NumberDecoder`, do:
```
client, err := elastic.NewClient(
elastic.SetDecoder(&elastic.NumberDecoder{}),
)
```
Of course, you can always provide your own decoder, as described in
https://github.com/olivere/elastic/wiki/Decoder.
0 commit comments