Changing all array elements in scripted field

I'm trying to use Kibana's "index patterns" -> "scripted fields" to manipulate the values of indexed fields.
When using either of the following script I am getting all the elements copied to the new scripted index:
doc['EntityTigerDestLong'].values
also, if I want to change only one value in the array, I can:
doc['EntityTigerDestLong'].values[0]+1

but I don't know how to change all the values at once.

hi @elad_sheinfeld

seems like you'd have to write a loop to do this.

For a template, see here:
https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-painless.html#_accessing_doc_values_from_painless

thx,

Yep, that solved it !
thanks

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