Skip to content

Make doc values accessible from update scripts #29290

Closed
@bra-fsn

Description

@bra-fsn

Feature request:
Elasticsearch supports a very compact representation/storage of data: the doc values.
Sometimes it's useful to omit fields from _source and store them only in doc values, this can be a real space saver (#27374 (comment))
Of course when you do this, you can't do partial updates on documents, because the previous value of the field is only stored in doc values.
This could be solved by making doc values accessible from update scripts, so you could do a scripted update like this:
ctx._source.counter=doc['counter']+1;

It would be nice if doc values could be accessed this way in update scripts along with the previous version of _source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Data Management/Indices APIsAPIs to create and manage indices and templates:Distributed Indexing/CRUDA catch all label for issues around indexing, updating and getting a doc by id. Not search.discuss

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions