IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Ingest processor context
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Ingest processor context
editUse 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
MapandListstructure 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/Liststructure to add, modify, or delete the fields of a document.
Return
- void
- No expected return value.
API
The standard Painless API is available.