Store output of script_fields in another field

I need to update an index which was created in ES 1.x. The index has a timestamp field which is enabled, but not stored.

I am using the ES Java Update API. For regular fields, the index can be updated with a script as
ctx._source.t1 = ctx.user

I can retrieve the timestamp field as
GET twitter/_search
{
"script_fields": {
"Timestamp": {
"script": "_fields['_timestamp']"
}
}
}

However, I want to update a field in the index with this script_fields output. Is that possible?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.