Skip to content

Unable to extract documents from MultiGetResponse #8572

Closed
@TSlump

Description

@TSlump

Elastic.Clients.Elasticsearch version: 8.15.4

Hi,

Inside the MultiGetResponse the elastic documents are wrapped by a MultiGetResponseItem, but this model doesn't expose any retrieval methods. What is the intended method of extracting the elastic documents from this response? Any guidance or documentation to look over would be greatly appreciated. Thanks!

Additional context:

var multiGetResponse = await this.elasticsearchClient.MultiGetAsync<ElasticModel>(c => c
   .Index("my-index")
   .Ids(new Ids(ids))
);

Gives me a MultiGetResponse<ElasticModel> type. Then doing var x = multiGetResponse.Docs.First(); gets me to a MultiGetResponseItem<ElasticModel>, however from here I can't find how to extract the elastic model.

Any help would be great, thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions