That's true. It's "updating" the whole document. Actually it is a Delete and an Index all together.
If your question was "how can I do partial updates of a document?" then have a look at Update API | Elasticsearch Guide [8.11] | Elastic
Which translates in Java to Update API | Java REST Client [7.17] | Elastic
TBH I don't really like this API and found it useful if and only if you have very big documents to update like 100's of kb of JSON. In that unique moment it makes sense to me to avoid sending too much data on the network.
For smaller documents, then I always prefer sending the whole document again.
An Update API is basically doing:
- GET the existing document
- Merge it with what you sent within the Update Request
- DELETE the existing document
- INDEX the new version of the document
Where an Index API is doing:
- DELETE the existing document if any
- INDEX the new version of the document
My 2 cents