How update works in Elasticsearch?
Yes, ES uses Lucene under the hood.
So update process is as follows high level
- Insert operation
- Marked older one for deletion - soft deletion
- When Lucene merges segments. It actually deletes the marked documents i.e tombstones.
At high level, how does crud work in ES.
Adding more info to @Gibbs answer, and specific to optimization:
You can utilize the update API with partial doc(send only the field which are changed) to save the n/w bandwidth, however under the hood it will be the complete rewrite of existing doc but if you have large docs then you would save a lot of time in n/w transfer.