NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Painless contexts
editPainless contexts
editA Painless script is evaluated within a context. Each context has values that are available as local variables, a whitelist that controls the available classes, and the methods and fields within those classes (API), and if and what type of value is returned.
A Painless script is typically executed within one of the contexts in the table below. Note this is not necessarily a comprehensive list as custom plugins and specialized code may define new ways to use a Painless script.
Name | Painless Documentation | Elasticsearch Documentation |
---|---|---|
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 |