How update works in Elasticsearch? How update works in Elasticsearch? elasticsearch elasticsearch

How update works in Elasticsearch?


Yes, ES uses Lucene under the hood.

So update process is as follows high level

  1. Insert operation
  2. Marked older one for deletion - soft deletion
  3. 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.