SDKits / ExamineX

Issue tracker for ExamineX
https://examinex.online
5 stars 0 forks source link

Exception in ConvertValues #85

Closed pariashiri1984 closed 1 year ago

pariashiri1984 commented 1 year ago

I am using a licenced version 4.0.0 and Umbraco version 10.2.1. I am using ExamineX for searching through particular nodes. All is okay in the free version locally but it's not working on licenced as I can't see this error locally I can't fix it. At first, I added some new Custom field types but due to this error I removed them guessing that was the source of the issue but after removing still same error happening, Any idea? I have this error in the Umbraco log:

System.FormatException: Input string was not in a correct format. at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) at System.String.System.IConvertible.ToInt32(IFormatProvider provider) at ExamineX.AzureSearch.AzureSearchFieldValueType.ConvertValues(IEnumerable1 values, SearchField field)+MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found) at ExamineX.AzureSearch.AzureSearchFieldValueType.AddValues(ExamineDocument doc, SearchField field, IReadOnlyList1 values) at ExamineX.AzureSearch.AzureSearchIndex.A(IReadOnlyList1 )+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at ExamineX.AzureSearch.AzureSearchIndex.A(IEnumerable`1 , CancellationToken ) at ExamineX.AzureSearch.AzureSearchIndex.E.A(Task )

Shazwazza commented 1 year ago

Hi there,

thanks for the report.

This will occur, for example, if you have a field defined as long and an invalid value is passed for it. This would also include an empty string.

A fix will be released shortly with version 4.1.4. A warning will be logged when this will occur and the value for the field will be set as the default value for that value type.

pariashiri1984 commented 1 year ago

Thanks for considering that.

Shazwazza commented 1 year ago

4.1.4 has been released.