In the below given use case, I want to update the name field and change its value to “My name is Mathews Fox”
"_index": "log",
"_type": "info log",
"_id": "7715ed0b-853e-4d28-b2e3-99156d6dcb3a",
"_score": 5.93148,
"_source": {
"Name": "My name is Lucius fox",
}
Thanks David!
The problem I have at hand is that I wouldn't be aware of id. I want to search on the substring "Lucius" in the "Name" field and if there is a match, then replace "Lucius" with "Mathews" in the "Name" field.
I have already tried this. Using this, I can update the complete value of a field but not the substring. I should be first able to identify whether the field contains a particular substring or not and if it does that replace it with the replacement string.
Share what you tried and we can probably help from there.
A full recreation script as described in About the Elasticsearch category would help. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
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.