How can I update a field of all documents of an index with one CURL?
Depending on the complexity of the logic for updating the field, you might consider using the update by query API or the reindex API, possibly with a script or ingest pipeline.
Thanks, Christian, update by query works for me.
The simplest usage of just performs an update on every document in the index without changing the source. This is useful to pick up a new property or some other online mapping change. Here is the API:
curl -XPOST 'localhost:9200/twitter/_update_by_query?conflicts=proceed&pretty'
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.