Skip to content

Nest 7.6 -> GetManyAsync methos -> throw UnexpectedElasticsearchClientException  #4462

Closed
@meriturva

Description

@meriturva

Using latest version 7.6 we have few problems on tests that use GetManyAsync call.

For example:
var response = await this.Context.Client.GetManyAsync<TEntity>(ids, this.IndexName);

Just generate exception:

 Elasticsearch.Net.UnexpectedElasticsearchClientException : Index name is null for the given type and no default index is set. Map an index name using ConnectionSettings.DefaultMappingFor<TDocument>() or set a default index using ConnectionSettings.DefaultIndex().
    ---- System.ArgumentException : Index name is null for the given type and no default index is set. Map an index name using ConnectionSettings.DefaultMappingFor<TDocument>() or set a default index using ConnectionSettings.DefaultIndex().
  Stack Trace: 
    Transport`1.RequestAsync[TResponse](HttpMethod method, String path, CancellationToken cancellationToken, PostData data, IRequestParameters requestParameters) line 149
    GetManyExtensions.GetManyAsync[T](IElasticClient client, IEnumerable`1 ids, IndexName index, CancellationToken cancellationToken) line 68

Actually I could give you a more precise reproduction of the problem but not in a short time.
Tell me if necessary.

Ps: i reverted version to 7.5.1 and tests pass again.

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