Description
There are several issues with SearchResponse unmarshaling:
- These lines are always defaulting to
in.Interface() path per v55 being nil interface
- There's no way to properly unmarshal
uint64 value (in.Interface() -> in.Float64() that loses precision)
Expected behavior
SearchResponse.Hits unmarshaling should be addressed
- It should be possible to unmarshal even the largest
uint64 value (math.MaxUint64)
Current behavior
SearchResponse.Hits always goes with in.Interface() path
math.MaxUint64 value will lose precision per unmarshaling as float64
Screenshots or Logs
Stored value: uint64(18446744073709551615)
Scanned value: float64(9223372036854775808)
Environment (please complete the following information):
- OS: Linux
- Meilisearch version: v1.1.0
- meilisearch-go version: v0.24.0
Description
There are several issues with
SearchResponseunmarshaling:in.Interface()path perv55being nil interfaceuint64value (in.Interface()->in.Float64()that loses precision)Expected behavior
SearchResponse.Hitsunmarshaling should be addresseduint64value (math.MaxUint64)Current behavior
SearchResponse.Hitsalways goes within.Interface()pathmath.MaxUint64value will lose precision per unmarshaling asfloat64Screenshots or Logs
Stored value:
uint64(18446744073709551615)Scanned value:
float64(9223372036854775808)Environment (please complete the following information):