-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
NEST/Elasticsearch.Net version:
7.9.0
Elasticsearch version:
7.6.2
Description of the problem including expected versus actual behavior:
We are using the JsonNetSerializer. One of our types should get a list of sub types with an abstract base class ( Event -> EventA ). For this case I have created a custom JsonConverter witch create the subtypes based on an type property. This works well with plain Json.Net and also with client.Get(). But on some places we use client.Source() and there is it where it stops working and we get:
Elasticsearch.Net.UnexpectedElasticsearchClientException: 'generated serializer for Event does not support deserialize.'
So it tries to deserialize the abstract base class Event instead of using the JsonConvert. I can see that the JsonConverter is not called at any time with .Source. So my guess is that .Source did not use the client.SourceSerializer. Maybe that is by design, but I did not find anything useful on the documentation.
Steps to reproduce:
Not yet
Expected behavior
.Source() also should use the SourceSerializer and so my case should work.