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. https://www.elastic.co/guide/en/elasticsearch/guide/master/partial-updates.html

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

Specifically for doing something like https://github.com/thinkaurelius/titan/blob/titan10/titan-es/src/main/java/com/thinkaurelius/titan/diskstorage/es/ElasticSearchIndex.java#L650 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.