Scripted field in mapping

clusterId:"cd59e4"
how can i add a scripted field that calculates depending on other fields in documents . and updates itself on updating the document.

You cannot.