2

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

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I didn't know indexing would cause round trip communication. Could you clarify on that please?
indexing wont cause - but updating from client side involves fetching + updating docs if you dont have doc externally maintained.. thats what i meant. sorry for any confusion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.