This way I only manage to update the value of the timestamp date, even though I am indicating reviewed_date. But I would like to be able to assign the value directly to reviewed_data without modifying other fields.
As the doc says, now is not supported in most Painless contexts.
To obtain current date, use ingest pipline and its metadata of timestamp.
I guess the timestamp field of your index was updated not by the update query but by some ingest pipeline defined elsewhere. Your script set reviewed_date field the same original data of reviewed_date field.
Even so, when I make a post to update the date field, both fields are updated: timestamp and reviewed_date.
Is there a possibility to only update the reviewed_date field?
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.