- Painless Scripting Language: other versions:
- Getting Started with Painless
- Painless Language Specification
- Painless contexts
- Context examples
- Ingest processor context
- Update context
- Update by query context
- Reindex context
- Sort context
- Similarity context
- Weight context
- Score context
- Field context
- Filter context
- Minimum should match context
- Metric aggregation initialization context
- Metric aggregation map context
- Metric aggregation combine context
- Metric aggregation reduce context
- Bucket script aggregation context
- Bucket selector aggregation context
- Analysis Predicate Context
- Watcher condition context
- Watcher transform context
- Painless API Reference
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 |