How can we update multiple documents using callwithrequest

l don't know if this is what you are looking for but this will update fields and their values throughout your indexes or index.

  POST logstash-*/_update_by_query
    {
      "script": {
        "source": "ctx._source.type='ChangeMeOld'",
        "lang": "painless"
      },
      "query": {
        "term": {
          "type.keyword": "changeMeNEW"
        }
      }
    }
1 Like