Pipeline definition
The job of ingest nodes is to pre-process the documents before sending them to the data nodes. This process is called a pipeline definition and every single step of this pipeline is a processor definition.
Getting ready
You need an up-and-running Elasticsearch installation as we described in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
How to do it...
To define an ingestion pipeline, you need to provide a description and some processors, as follows:
We will define a pipeline that adds a field
user
with the value,john
:{ "description" : "Add user john field", "processors" : [ { "set" : { "field": "user", "value": "john" } } ] }
How it works...
The generic template representation is the following one:
{ "description" : "...", "processors" : [ ... ], "version": 1, "on_failure" : [ ...