Skip to content

Succesful Bulk API request produces invalid NEST response #6974

@gilmatok

Description

@gilmatok

NEST/Elasticsearch.Net version: 7.17.4

Elasticsearch version: 8.4

.NET runtime version: .NET 5

Operating system version: Ubuntu 18.04

Description of the problem including expected versus actual behavior:
Succesful Bulk API request produces invalid NEST Response.

Even though the operation is completed succesfully and all the items return updated for their Result property, the request produces an invalid NEST response, and the IsValid property for all the items is false with nothing in the Error property.

When running the request through Elastic's API, the operation is completed succesfully without any error.

Expected behavior
The response should be returned as valid, and all the items should be returned with IsValid with value of true.

Provide ConnectionSettings (if relevant): N/A

Provide DebugInformation (if relevant):

C#:

var partials = items.Select(i => new
{
    Id = i.Id,
    Content = i.Content
});

Func<BulkDescriptor, IBulkRequest> request = b =>
{
    b
    .Index(indexName)
    .UpdateMany(partials, (bulk, descriptor) => bulk
        .Doc(descriptor)
        .RetriesOnConflict(3));
    return b;
};

var response = await client.BulkAsync(request);

NEST response:

{Invalid NEST response built from a successful (200) low level call on POST: /update_v3.3_6da1fd3bcab54fba83a420ce8c70ad3f/_bulk?pretty=true&error_trace=true}

{update returned 200 _index: update_v3.3_6da1fd3bcab54fba83a420ce8c70ad3f _type:  _id: G5Or4aNPjInSyDeMgNaP8A _version: 2 error: }

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.xRelates to a 7.x client version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions