- Painless Scripting Language: other versions:
- Painless Guide
- Painless Language Specification
- Painless contexts
- Context example data
- Runtime fields context
- 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
- Shared API
- Aggregation Selector API
- Aggs API
- Aggs Combine API
- Aggs Init API
- Aggs Map API
- Aggs Reduce API
- Analysis API
- Bucket Aggregation API
- Field API
- Filter API
- Ingest API
- Interval API
- Moving Function API
- Number Sort API
- Painless Test API
- Processor Conditional API
- Score API
- Script Heuristic API
- Similarity API
- Similarity Weight API
- String Sort API
- Template API
- Terms Set API
- Update API
- Watcher Condition API
- Watcher Transform API
- Xpack Template API
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 |