Script vs Document for partial update

I saw there are two ways to do partial update. One is via doc parameter and one via scripts.

I like to know which one is better. What are the advantages and disadvantages of each approach?

Specifically for doing something like will document update work better than script update?

TO update the document Elasticsearch follows delete and index the document.

So there are two ways as you mentioned partial update using scripts as well as partial update using documents.

I would consider the first one i.e. using scripts which is we can update based on condition where as using document we may concentrate or stick on to that document.