-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Different classes between filters and return document #8186
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
Comments
Agreed! I'm new to Elastic Search myself, but it actually looks like a variant of this feature was available in a previous version based on this thread: https://stackoverflow.com/questions/66143051/elasticsearch-mapping-dto-after-source-filtering-in-net (SearchDescriptor no longer seems to exist in a form where this works the new .NET library). |
Hi @flobernd thanks for the feedback. Do you know if there is any workaround to reach the result in the meantime you implement the correct solution? |
Duplicate of #7792 |
Is your feature request related to a problem? Please describe.
In a scenario when you have to read partially the document (a projection) would be nice to have different classes for the query and for the result.
This is absolutely helpful when you use a class that uses the required keyword for some properties, here an example
the projection object could be something like
With that scenario and
SourceFilter
is not possible because the deserialization process says that some required fields are missing (Property3 and Property4 in this example).Describe the solution you'd like
Additional context
I'm using a custom serilization class that uses System.Text.Json with source generators
The text was updated successfully, but these errors were encountered: