I would like to know how Elasticsearch handles partial updates of nested documents internally? If there is any update to nested documents, does it still reindex the complete parent document or smartly just updates the respective references in parent document? What is the performance impact of updating nested documents (partial updates)?
Updates are expensive because it is a complete replacement of all elements.
A partial update will read the whole JSON (root object and nested children) into memory, apply the change then delete the old root+nested Lucene docs and create new root+nested Lucene docs to replace them.
This is done to keep root and nested docs physically next to each other on-disk for optimal query speeds.
Thank you so much.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.