The es.update.script.inline property is meant to be the actual inline script. In this case, you should have it set to ctx._source.last = params.last.
As for the es.update.script.paramsparameter, you should set it to last:fieldName to pick up a value from each document that is being written, or last:<Frost> if you want every document to use a constant value in its parameter.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.