A scripted update modifies an existing Elasticsearch document with executable logic. Instead of supplying only fixed field values, the request places a script under _update; the script reads and changes fields through ctx._source. Conditions can decide whether and how the document changes. section 5.4.3
Classifying a movie as a blockbuster
A movie can receive a blockbuster flag when its box-office earnings exceed a threshold. The script can compare ctx._source.boxoffice_gross_in_millions with a fixed value, or receive the threshold dynamically through params. This keeps the update logic in source while allowing the business value to change.
