I am trying to update only one entry in an array.
For Example:
"myArray":[
"entry1",
"entry2"
]
I am trying to change the entry2 entry to entry3 and leave entry1 alone.
If I use
{"script": { "inline": "ctx_source.myArray = ['entry3']", "query": {"term": {"myArray":"entry2"}}}
It sets the entire array to entry3 and removes the entry1 item from the array.
Any example I can find only addresses objects in an array where an entire field is changed.
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.