Description
Hi Team,
NEST/Elasticsearch.Net version: Elastic.Clients.Elasticsearch 8.0.0-beta.1
Elasticsearch version: 8.2.3
Description of the problem:
When invoking the MultiGetAsync a status 400 is returned from the api.
Passing in a MultiGetRequestDescriptor or a MultiGetRequest with an array of ids, results in a request body that looks as follows:
{"ids":{}}.
My method call:
This is also the case when specifying each document to return. Here the request body created is: {"docs":{"_id":""}} and my method call:
According to the documentation both "docs" and "ids" should be an array.
docscumentation of mget: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html:
Debug information:
Elastic.Transport.TransportException: Request failed to execute. Call: Status code 400 from: POST /_mget?pretty=true&error_trace=true. ServerError: Type: parsing_exception Reason: "unexpected token [START_OBJECT], expected [FIELD_NAME] or [START_ARRAY]"
Request:
{"ids":{}}
Response:
{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "unexpected token [START_OBJECT], expected [FIELD_NAME] or [START_ARRAY]",
},
"status" : 400
}