Skip to content

GetMany doesn't detect default index and type from generic T parameter #2093

@oguzhaneren

Description

@oguzhaneren

NEST/Elasticsearch.Net version: 2.3.1

Elasticsearch version: 2.32

Description of the problem including expected versus actual behavior:

When i call GetMany method, nest thrown exception like below:
Request:

_elasticClient.GetMany(taskIds)

Exception:

# FailureReason: BadResponse when trying to POST http://localhost:9200/_mget
# Audit trail of this API call:
 - BadResponse: Node: http://localhost:9200/ Took: 00:00:00.0414999
# ServerError: ServerError: 400Type: action_request_validation_exception 
Reason: "Validation Failed: 1: index is missing for doc 0;2: 
index is missing for doc 1;3:

But when I add defaultIndex and type to GetMany call everythink is ok.

 _elasticClient.GetMany(taskIds),index:_elasticClient.ConnectionSettings.DefaultIndex,type:"task"]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions