meilisearch-go icon indicating copy to clipboard operation
meilisearch-go copied to clipboard

Search response unmarshal issues

Open candiduslynx opened this issue 1 year ago • 8 comments

Description

There are several issues with SearchResponse unmarshaling:

  1. These lines are always defaulting to in.Interface() path per v55 being nil interface
  2. There's no way to properly unmarshal uint64 value (in.Interface() -> in.Float64() that loses precision)

Expected behavior

  1. SearchResponse.Hits unmarshaling should be addressed
  2. It should be possible to unmarshal even the largest uint64 value (math.MaxUint64)

Current behavior

  1. SearchResponse.Hits always goes with in.Interface() path
  2. 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

candiduslynx avatar May 16 '23 07:05 candiduslynx