Reputation: 1283
I am trying to understand the difference between update and index operation in ElasticSearch for existing document in terms of efficiency and as per the documentation(link given below), update removes network roundtrips. Can someone explain how?
Link - https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-update.html
Upvotes: 2
Views: 4092
Reputation: 1336
With update, you can send partial/scripted updates to elasticsearch - ES internally loads the document into map , applies updated fields and does reindexing operation.
I would use index if you have entire document available in caller / document is not very huge. Update does avoid round trip to client, but it got some processing overhead on ES side.
Upvotes: 3