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
Description of the problem including expected versus actual behavior:
When calling elasticsearchclient.MultiGetAsync<TDocument>(request, cancellationToken) where the request looks like this:
A 400 Response is returned with the following message:
Elastic.Transport.TransportException: Request failed to execute. Call: Status code 400 from: POST /_mget?pretty=true&error_trace=true. ServerError: Type: action_request_validation_exception Reason: "Validation Failed: 1: index is missing for doc 0;"
Steps to reproduce:
Do above request to an instance of Elasticsearch with an index mapped to TDocument and a document with Id 1 settings.DefaultMappingFor<TDocument>(x => x.IndexName("my-index"));
Expected behavior
A List with a single item is returned
please try to use MultiGetRequestDescriptor<TDocument> instead. The inference is usually done at descriptor creation. The request class does not support a generic type parameter and therefore has no way to determine the type of the document.
Hi @deMD, I'm sorry I think I tested the wrong thing yesterday 😪
You are completely right, there is a bug in the generator that breaks the inference for descriptors that only have a required index/indices argument but not an id.
Elastic.Clients.Elasticsearch version: 8.13.10
Elasticsearch version: 8.4.1/8.6.1
.NET runtime version: Net 6.0
Description of the problem including expected versus actual behavior:
When calling
elasticsearchclient.MultiGetAsync<TDocument>(request, cancellationToken)
where the request looks like this:A 400 Response is returned with the following message:
Steps to reproduce:
TDocument
and a document with Id 1settings.DefaultMappingFor<TDocument>(x => x.IndexName("my-index"));
Expected behavior
A List with a single item is returned
Provide
DebugInformation
(if relevant):The text was updated successfully, but these errors were encountered: