Skip to content

Elasticsearch should support returning doc values in get and update APIs too #27374

@bra-fsn

Description

@bra-fsn

Search API supports returning fields' doc values:
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-docvalue-fields.html

Because doc values offer a more compact representation of the given fields than the _source does with JSON, I think it would be beneficial to support returning them with more APIs. This would even enable excluding all fields from _source and serve them only from doc values.

Prominent examples come to my mind are:

  • get API (similar to search and current stored fields, it could support this: GET twitter/tweet/2?routing=user1&docvalue_fields=tags,counter)
  • update API (for example after a scripted update with a _source excluded field it would be useful to return the doc value field)

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