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
When a quite long string is put to Filters property of Query object, it throws Invalid URI: The Uri string is too long exception during serialization. Here is a stack trace:
at System.UriHelper.EscapeString(String input, Int32 start, Int32 end, Char[] dest, Int32& destPos, Boolean isUriString, Char force1, Char force2, Char rsvd)
at System.Uri.EscapeDataString(String stringToEscape)
at Algolia.Search.Utils.QueryStringHelper.<>c__DisplayClass1_0`1.<ToQueryString>b__1(PropertyInfo p)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.SparseArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.SparseArrayBuilder`1.ReserveOrAdd(IEnumerable`1 items)
at System.Linq.Enumerable.ConcatNIterator`1.LazyToArray()
at System.Linq.Enumerable.ConcatNIterator`1.ToArray()
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Algolia.Search.Utils.QueryStringHelper.ToQueryString[T](T value, String[] ignoreList)
at Algolia.Search.Serializer.QueryConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Algolia.Search.Serializer.SerializerHelper.Serialize[T](T data, Stream stream, JsonSerializerSettings settings)
at Algolia.Search.Transport.HttpTransport.CreateRequestContent[T](T data)
at Algolia.Search.Transport.HttpTransport.ExecuteRequestAsync[TResult,TData](HttpMethod method, String uri, CallType callType, TData data, RequestOptions requestOptions, CancellationToken ct)
at Algolia.Search.Clients.SearchClient.MultipleQueriesAsync[T](MultipleQueriesRequest request, RequestOptions requestOptions, CancellationToken ct)```
The usage of Uri.EscapeDataString in this method
https://github.com/algolia/algoliasearch-client-csharp/blob/5e79898740de9c31f0bff7199a6d00cd1079c04d/src/Algolia.Search/Utils/QueryStringHelper.cs#L81 causes the issue since it has some limitations of its length.
The text was updated successfully, but these errors were encountered:
When a quite long string is put to Filters property of Query object, it throws
Invalid URI: The Uri string is too long
exception during serialization. Here is a stack trace:The text was updated successfully, but these errors were encountered: