This is a cache of https://www.elastic.co/guide/en/elasticsearch/painless/8.19/painless-api-reference.html. It is a snapshot of the page as it appeared on 2025-11-22T03:22:37.775+0000.
Painless API Reference | Painless Scripting Language [8.19] | Elastic
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Painless API Reference

edit

Painless has a strict list of allowed methods and classes per context to ensure all Painless scripts are secure. Most of these methods are exposed directly from the Java Runtime Environment (JRE) while others are part of Elasticsearch or Painless itself. Below is a list of the available APIs per context. The shared API is available to all contexts, while the specialized API available differs between contexts.