Closed MarufSaidov6 closed 8 months ago
A new version of the API is now released (in Alpha) and this issue is fixed.
The Alpha version is now released on Nuget.
If you have time, we need customer feedback about this new version. It's still not GA so you may not want to use it in production.
There is no more deps on Newtonsoft, all Algolia APIs are now available (Insights, Recommend, Query Perso, ...) and all models and routes are synced.
To help you migrate, there is a Migration guide.
Happy to help in your migration process !
Algolia Client Version: 6.16.0 Language Version: .net 6.0
Description
When using the
GetObjectAsync<T>
method with a list ofattributesToRetrieve
, the attributes are double-encoded. This behavior leads to incorrect query parameters being sent to Algolia, causing the API to return unexpected results or errors. Specifically, commas between attributes are encoded as%252C
instead of%2C
.await _offerForSearchRepository.GetByFacetOfferIdAsync(offerId, new List<string> { "score ", "search_result.price ", "search_result.old_price" }, cancellationToken);
...?attributesToRetrieve=score%252Csearch_result.price%252Csearch_result.old_price
Steps to Reproduce
attributesToRetrieve
parameter.GetObjectAsync<T>
method.Expected Behavior
The attributes in the
attributesToRetrieve
parameter should be correctly encoded once, turning commas into%2C
, and the API should return the object with only the requested attributes.Actual Behavior
The attributes are double-encoded, with commas turning into
%252C
. The API call does not return the expected results because the query parameters are not correctly interpreted by the Algolia API.