Question: I've got an application where a change to a document should always get persisted into ElasticSearch only after it's validated against the full document. So I always have to retrieve the full document! Is partial update better then full update in regards to performance are there any other benefits ?
Elasticsearch documentation for partial update mentions that documents are immutable and that internally partial updates like full update reindex the full document.
Externally, it appears as though we are partially updating a document in place. Internally, however, the update API simply manages the same retrieve-change-reindex process
The documentation also mentions the following which I assume is "benefit of partial update over full update" but I don't understand. If there is a document in shard A and I do a full update on it or partial update that is in total one request. What does multiple request mean here ?
The difference is that this process happens within a shard, thus avoiding the network overhead of multiple requests
As you mentioned above both partial update
and full update
use retrieve-change-reindex
process to make updation.
But the difference is :
Partial Update
which uses update API
achieves retrieve-change-reindex
through a single client request, while full update
which uses index API
requires separate get
and index
requests , and that's why full update
has network overhead of multiple requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With