I tried using _reindex, but I get an error. I want to add a new field and initialize it to an existing value. I added the new field to the mapping and I created the dest index.
Is it because we have dashes in our field names? I played around a bit more and it works if I use field names without dashes. Does painless not support dashes? Is there another way to do this?
_source is a HashMap in Painless. For keys containing special characters, like your -, you can use square bracket notation to access the keys. Try accessing your fields like this:
Thank you Abdon. I was trying something like that, but I had left the period between source and [. I tried it like your example and got this error. Seems it is still parsing the name and not liking the dash.
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.