Skip to content

mGET API doesn't have an option to not return metadata fields #14556

@colings86

Description

@colings86

In the GET API you can specify the URL as /{index}/{type}/{id}/_source and it will return only the _source in the response (i.e. will not return the metadata fields such as _id and _type). This is done by the RestGetSourceAction and is only available in the REST API (AFAIK).

This option does not seem to be available on the mGET API. You cannot set /_source on the request to exclude the metadata fields from the responses. You also cannot specify this on each get individually.

I wonder if we should add this? I can't think of a concrete use case for this but it is an inconsistency between the GET and mGET APIs. Marking this issue as 'Discuss' to see if there is any usecases which this would be useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Indexing/CRUDA catch all label for issues around indexing, updating and getting a doc by id. Not search.>enhancementhelp wantedadoptme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions