cost of updates vs insert in elasticsearch

Viewed 1926

I want to update two fields for all documents in elasticsearch. According to the elasticsearch document:

In Updating a Whole Document, we said that the way to update a document is to retrieve it, change it, and then reindex the whole document.

1- what is the difference between partial update and the whole update in index structure?

2- Is the partial update documents equivalence to the with delete and insertion to documents?

1 Answers

Updating document in elasticsearch behind the scene is combination of insert and delete operation.

what is the difference between partial update and the whole update in index structure?

Ans:- in case of partial update you don't send the whole document which gives your performance benefit as you will have to send less data on network, and ES behind the scene merge the partial update with existing doc and same insert and delete both operation happen.

2- Is the partial update documents equivalence to the with delete and insertion to documents?

Ans: Yes, explained more in first answer.

Related