Skip to content

BulkAsync ignores request-level index setting #8522

Open
@jonyadamit

Description

@jonyadamit

Elastic.Clients.Elasticsearch version: 9.0.3

Elasticsearch version: 9.0.1

.NET runtime version: 9

Operating system version: Windows Server 2019 Standard

Description of the problem including expected versus actual behavior:
Calling client.BulkAsync(b => b.Index("someindex").IndexMany<T>(entities) fails with:

Index name is null for the given type and no default index is set. Map an index name using ConnectionSettings.DefaultMappingFor() or set a default index using ConnectionSettings.DefaultIndex()

As a workaround, I now need to call client.BulkAsync(b => b.IndexMany(entities, (e, x) => e.Index(indexName))

Moreover, this happens even though a default mapping does exist for the type, so this bug might be two-fold.

Steps to reproduce:

  1. Call BulkAsync with an index name in BulkRequestDescriptor, but without index name in BulkIndexOperationDescriptor.

Expected behavior
The bulk index should take the index name from the request if specified.

Provide ConnectionSettings (if relevant):

Provide DebugInformation (if relevant):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions