0

I have "stores" index in elasticsearch and want to add "chain" field with following json:

{
"properties": {
    "chain": {
        "type": "string",
        "store": true
    }
}

How can I set default value for all existiong documents in the index?

drew
  • 1
  • 1
  • 4
  • If there is no way to do that, how do I update all the documents without retrieving all the ids and bulk updating them? – drew Sep 29 '16 at 13:14
  • This answer might help: http://stackoverflow.com/questions/38636348/find-and-replace-in-elasticsearch-all-documents/38636633#38636633 (hint: use update-by-query) – Val Sep 29 '16 at 13:16
  • Yes, this will help. Thanks! – drew Sep 29 '16 at 13:18

0 Answers0