I'm trying to create a rest call that will perform the following.
find all documents that match a simple query of field:value.
in those documents, update the value of the "timestamp" field to be timestamp - 1 minute.
I was thinking to do this with the update by query api, I'm just not sure how to write the painless script to do the subtraction update of the timestamp field.
You are using ctx._timestamp instead of ctx._source.timestamp (or ctx._source.fieldname, where fieldname is the name of the timestamp field you are trying to update).
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.