Skip to content

update document partially by specified entity #2304

Closed
@puppylpg

Description

@puppylpg

Now if we wanna update a document, a UpdateQuery must be constructed manually, but this is a little unnecessary. Especially for the condation that:

  1. get a document from index;
  2. update some field of the document;
  3. write the doc back;

Problems are:

  1. if write the doc back using save(ENTITY), values of fields which are unmapped in the entity will be discarded;
  2. if write the doc back using update(UpdateQuery, IndexCoordinates), a UpdateQuery and a IndexCoordinates must be constructed manually;

So i think update(T entity) is necessary, and spring-data-elasticsearch can construct the UpdateQuery and IndexCoordinates automatically, which is very handy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions