How can I find and replace partial data in elasticsearch?
I have tried update_by_query. However, it replaces the whole value in a certain field which is not what I am looking for. What I am trying to achieve is to find 'cat' in a sentence and replace it with 'dog'
"this is a cat" ===> "this is a dog"
I have tried the following query:
// body: {
// script: {source: ctx._source.aa = params.term,
// params: {term: dog},
// lang: "painless"
// },
// query: {term: cat}
// }};