In Chapter 5, Search, we've seen many filters. Elasticsearch scripting allows the extension of a traditional filter with custom scripts.
Using scripting to create a custom filter is a convenient way to write scripting rules not provided by Lucene or Elasticsearch, and to implement business logic not available in a DSL query.
You need an up-and-running Elasticsearch installation as we described in 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
) available in the online code and Javascript/Python Language scripting plugins installed.