Ingest processor context

Use a Painless script in an ingest processor to modify documents upon insertion.

Variables

params (Map, read-only)
User-defined parameters passed in as part of the query.
ctx['_index'] (String)
The name of the index.
ctx['_type'] (String)
The type of document within an index.
ctx (Map)
Contains extracted JSON in a Map and List structure for the fields that are part of the document.

Side Effects

ctx['_index']
Modify this to change the destination index for the current document.
ctx['_type']
Modify this to change the type for the current document.
ctx (Map, read-only)
Modify the values in the Map/List structure to add, modify, or delete the fields of a document.

Return

void
No expected return value.

API

The standard Painless API is available.