-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to serialize double value #7757
Comments
Same happens for |
I submitted a PR for this last week, #7753. It is a bug that only happens when running .NET Framework, not .NET Core or later. As a temporary workaround you can remove
|
@karl-sjogren Your workaround helped. Thanks a lot! Can continue moving forward with client 8.x |
Thanks @karl-sjogren. Will get that PR merged for the next patch release. |
The Exception
Tested with Client 8.1.3 and Transport 0.4.14 @stevejgordon Could you re-open this issue? Is there a unit test in the project, so I can see what I'm doing different? |
There are no unit tests for .NET Framework which is why this went unnoticed from the start. |
Yeah looking at this another minute shows that the .NET Framework code is completely broken (or rather, incomplete). Since there were not tests to verify it I missunderstood how severe this was. It didn't just fall through to always throw an exception, the .NET Framework code copies the value into a I can have a look at fixing this in the coming days and when #7769 is done we can add proper tests for this as well. |
#7769 is nearly complete, but I don't want to merge it before the existing tests are passing. |
Of course, I'll prepare a PR for this issue and wait until #7769 is done to make sure that this is fixed for good. |
Elastic.Clients.Elasticsearch version: 8.1.1
Elasticsearch version: 8.7.1
.NET runtime version: .NET FW 4.7.2
Operating system version: Win10 22H2
Description of the problem including expected versus actual behavior:
Cannot index an instance of a class containing a public property of type double.
Elastic.Transport.UnexpectedTransportException: Unable to serialize double value.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: