elasticsearch/elasticsearch — pull request #7144 by markharwood (2014-08-04 09:55:48+00:00)
Title: Update API enhancement - add support for scripted upserts.

In the case of inserts the UpdateHelper class will now allow the script used to apply updates to run on the upsert doc provided by clients. This allows the logic for managing the internal state of the data item to be managed by the script and is not reliant on clients performing the initialisation of data structures managed by the script.
Associated issue: https://github.com/elasticsearch/elasticsearch/issues/7143