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
Custom fields are not being mapped properly when pulling from the returned set of search results. Complex objects don't come back at all and result in the error: Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JValue. Because of this it requires developers using the library to map these custom fields on their own.
I did some quick tests in Epinova.ElasticSearch.Core.Engine.SearchEngine.cs, and it seems a small change to the Map function could fix this. My proposed changes for Epinova.ElasticSearch.Core.Engine.SearchEngine.cs is below
The unit test Query_ReturnsCustomProperties() in Core.Tests.Engine.SearchEngineTests.cs will have to be updated slightly as the casting fails to convert the arrays to IEnumerable<object>. Here is the slight modification to that unit test to make it pass.
Custom fields are not being mapped properly when pulling from the returned set of search results. Complex objects don't come back at all and result in the error: Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JValue. Because of this it requires developers using the library to map these custom fields on their own.
I did some quick tests in Epinova.ElasticSearch.Core.Engine.SearchEngine.cs, and it seems a small change to the Map function could fix this. My proposed changes for Epinova.ElasticSearch.Core.Engine.SearchEngine.cs is below
The unit test Query_ReturnsCustomProperties() in Core.Tests.Engine.SearchEngineTests.cs will have to be updated slightly as the casting fails to convert the arrays to IEnumerable<object>. Here is the slight modification to that unit test to make it pass.
The text was updated successfully, but these errors were encountered: