Skip to content

Multiple Get Requests for Documents of Different Unrelated Types #8489

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

Closed
InsperDylan390 opened this issue Apr 8, 2025 · 3 comments
Closed

Comments

@InsperDylan390
Copy link

Is your feature request related to a problem? Please describe.
I would like the ability to optimize my requests to Elastic using the Multiple Get functionality, but the current syntax returns all documents in a single list of TDocument responses.

Describe the solution you'd like
I would like the Multiple Get syntax to allow each individual get operation in the aggregate request to identify a specific TDocument type to retrieve and deserialize the found document into.

Describe alternatives you've considered
It might be possible to make a request for some generic shared type, but it would require a very robust deserialization strategy?

Additional context
I believe there are open issues for an equivalent issue in the multiple search functionality? Not as pressing, but it would be interesting to have the ability to Index documents of different documents of different types in the same request as well?

@flobernd
Copy link
Member

Hi @InsperDylan390 ,

that is nothing that can be implemented in the client library since this is very specific to the document types.

It might be possible to make a request for some generic shared type, but it would require a very robust deserialization strategy?

Yes, this is exactly the way to go.

The documents you want to retrieve should have a common base class and the required System.Text.Json polymorphism attributes.

Please let me know, if you have further questions.

@flobernd flobernd added State: Awaiting Response 8.x Relates to a 8.x client version labels Apr 11, 2025
Copy link
Contributor

This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 2 days.

Copy link
Contributor

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants