Description
I was trying to list the indices inside my application, like so:
indices, err := client.ListIndices(client.NewApiListIndicesRequest())
This crashes with
cannot decode result: failed to unmarshal response body: json: cannot unmarshal number 2458890427 into Go struct field FetchedIndex.items.fileSize of type int32
DataSize probably needs to be bumped as well.
I believe int32 goes from -2^31 to +2^31 and indeed, 2458890427 is greater than 2^31… let's use int64 at least here:
|
FileSize int32 `json:"fileSize"` |
?
Client
Search
Version
v4.15.4
Relevant log output
> ALGOLIA DEBUG: > ALGOLIA DEBUG response:
body=
{
"items": [
{
"name": "int_products_gb",
"createdAt": "2025-05-15T19:05:01Z",
"updatedAt": "2025-05-15T19:08:04.903Z",
"entries": 462607,
"dataSize": 1693994299,
"fileSize": 2458890427,
"replicas": [
"virtual(int_products_gb_price_asc)",
"virtual(int_products_gb_rating_desc)",
"virtual(int_products_gb_price_desc)",
"int_products_gb_abtest_candidate"
]
},
Description
I was trying to list the indices inside my application, like so:
This crashes with
cannot decode result: failed to unmarshal response body: json: cannot unmarshal number 2458890427 into Go struct field FetchedIndex.items.fileSize of type int32DataSizeprobably needs to be bumped as well.I believe
int32goes from -2^31 to +2^31 and indeed, 2458890427 is greater than 2^31… let's useint64at least here:algoliasearch-client-go/algolia/search/model_fetched_index.go
Line 22 in 058eb86
Client
Search
Version
v4.15.4
Relevant log output