Painless contexts
editPainless contexts
editA Painless script is evaluated within a context. Each context has values that are available as local variables, an allowlist that controls the available classes, and the methods and fields within those classes (API), and if and what type of value is returned.
Painless scripts typically run within one of the contexts in the following table. Before using a Painless context, configure the example data. Each context example is configured to operate on this data.
Name | Painless Documentation | Elasticsearch Documentation |
---|---|---|
Runtime field |
||
Ingest processor |
||
Update |
||
Update by query |
||
Reindex |
||
Sort |
||
Similarity |
||
Weight |
||
Score |
||
Field |
||
Filter |
||
Minimum should match |
||
Metric aggregation initialization |
||
Metric aggregation map |
||
Metric aggregation combine |
||
Metric aggregation reduce |
||
Bucket script aggregation |
||
Bucket selector aggregation |
||
Watcher condition |
||
Watcher transform |