Elasticsearch allows you to update a document in-place. Updating a document using scripting reduces network traffic (otherwise, you need to fetch the document, change the field or fields, and then send them back) and improves performance when you need to process a large number of documents.
Updating a document using scripts
Getting ready
You will need an up-and-running Elasticsearch installation – similar to the one that we described in the Downloading and installing Elasticsearch recipe in Chapter 1, Getting Started.
To execute the commands, any HTTP client can be used, such as curl (https://curl.haxx.se/) or postman (https://www.getpostman.com/). You can use the Kibana console as it provides...