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
I'm trying to implement Algolia recommendations using the client.get_recommendations method. While the response indicates there are hits (@nb_hits=5), the hits array itself contains only nil values: @hits=[nil, nil, nil, nil, nil].
Here’s the code I’m using to make the recommendations request:
Expected Behavior
The hits array should contain actual recommended items instead of nil values.
Actual Behavior
The hits array in the response contains only nil values, even though @nb_hits=5.
Question
Is there something wrong with the way I’ve configured the request? Could the issue be related to the data in my index or the related-products model?
Any guidance on resolving this issue would be greatly appreciated!
Client
Recommend
Version
3.7.1
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
amin19948
changed the title
[bug]: Hits Array Contains Nil Values in client.get_recommendations Response
Hits Array Contains Nil Values in client.get_recommendations Response
Nov 15, 2024
Hey @amin19948 thanks for reporting the issue, sorry we did not came back to you earlier!
I can confirm this is a deserialization issue on the API client side, in the meantime of a fix you can append _with_http_info to the methods you are using (e.g. get_recommendations_with_http_info) which should return the raw response and use it like below
Description
I'm trying to implement Algolia recommendations using the
client.get_recommendations
method. While the response indicates there are hits (@nb_hits=5
), the hits array itself contains only nil values:@hits=[nil, nil, nil, nil, nil]
.Here’s the code I’m using to make the recommendations request:
This is the response object I’m receiving:
Expected Behavior
The hits array should contain actual recommended items instead of nil values.
Actual Behavior
The hits array in the response contains only nil values, even though @nb_hits=5.
Question
Is there something wrong with the way I’ve configured the request? Could the issue be related to the data in my index or the related-products model?
Any guidance on resolving this issue would be greatly appreciated!
Client
Recommend
Version
3.7.1
Relevant log output
No response
The text was updated successfully, but these errors were encountered: