WARNING: Version 6.2 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Painless is a simple, secure scripting language designed specifically for use with Elasticsearch. It is the default scripting language for Elasticsearch and can safely be used for inline and stored scripts. For a detailed description of the Painless syntax and language features, see the Painless Language Specification.
- Fast performance: Painless scripts run several times faster than the alternatives.
- Safety: Fine-grained whitelist with method call/field granularity. See the Painless API Reference for a complete list of available classes and methods.
Optional typing: Variables and parameters can use explicit types or the
- Syntax: Extends Java’s syntax to provide Groovy-style scripting language features that make scripts easier to write.
- Optimizations: Designed specifically for Elasticsearch scripting.