Scripting in ingest processors
In Chapter 12, Using the Ingest Module, we will see several types of ingest processors.
Ingest processors are the building blocks for an ingestion pipeline; they describe an action that can be executed on a document to modify it.
Scripting is the main functionality used in processors to provide the core functionalities for completeness. Their scripting functionalities are discussed in this chapter.
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.
How to do it...
We will simulate a pipeline with a set and a script processor. To modify our documents before ingesting them, we will perform the following steps:
- Execute a pipeline simulation API call with the two processor steps and two documents as a sample:
POST /_ingest/pipeline/_simulate { “pipeline”: { ...