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
Is your feature request related to a problem? Please describe.
In the ES 7 NEST Client it was possible to send a request using SearchAsync, which has a Query with a generic type of a base class and then cast it to a child class. Currently, sending such request using SearchRequestDescriptor<TDocument> parameter, outputs already casted elements to the particular TDocument type.
Describe the solution you'd like
It would be nice to have an overload of SearchAsync, which accepts another generic type than the provided input type and casts the response results to it.
Describe alternatives you've considered
Not sure if there is an alternative currently, I considered changing the generic types of the descriptors to the requested ones, but with huge codebase with many document types, the code reusability goes down considerably.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
In the ES 7 NEST Client it was possible to send a request using
SearchAsync
, which has aQuery
with a generic type of a base class and then cast it to a child class. Currently, sending such request usingSearchRequestDescriptor<TDocument>
parameter, outputs already casted elements to the particularTDocument
type.Describe the solution you'd like
It would be nice to have an overload of
SearchAsync
, which accepts another generic type than the provided input type and casts the response results to it.Describe alternatives you've considered
Not sure if there is an alternative currently, I considered changing the generic types of the descriptors to the requested ones, but with huge codebase with many document types, the code reusability goes down considerably.
The text was updated successfully, but these errors were encountered: