Elasticsearch allows us to define complex expressions that can be used to return a new calculated field value.
These special fields are called script_fields
, and they can be expressed with a script in every available Elasticsearch scripting language.
You need an up-and-running Elasticsearch installation as we described the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
To execute curl
via the command-line you need to install curl
for your operating system.
To correctly execute the following commands, you need an index populated with the script chapter_09/populate_for_scripting.sh
script available in the online code.