I wanted to replace the single username in all my elasticsearch index documents. Is there any API query ?
I tried searching multiple but couldn\'t find. Any one has
update-by-query is the way to go.
POST /test/movies/_update_by_query { "script": { "inline": "ctx._source.user = 'alice'" }, "query": { "term": { "user": "bob" } } }
Note: make sure to enable dynamic scripting in order for this to work.