elasticsearch-net icon indicating copy to clipboard operation
elasticsearch-net copied to clipboard

One Way Conversions from CreateIndexRequestDescriptor<TDocument> to CreateIndexRequestDescriptor

Open InsperDylan390 opened this issue 11 months ago • 1 comments

Is your feature request related to a problem? Please describe. I'm working with elastic in a context using a large number of generic classes. In contexts where it would make sense to perform an action for a set of indexes I run into issues where I would like to setup a request for a given TDocument, but use it in a context that doesn't know about TDocument. For example, creating an instance of CreateIndexRequestDescriptor<TDocument, but then using the untyped Indicies.Create.

Describe the solution you'd like Perhaps the ability to convert CreateIndexRequestDescriptor<TDocument> and other similar requests from the generic types into their non-generic equivalents?

Describe alternatives you've considered Alternatively, having a concrete type relationship between the generic and non-generic types would also allow for easy conversion between the two?

Additional context Add any other context or screenshots about the feature request here.

InsperDylan390 avatar Jul 20 '23 20:07 InsperDylan390