| 1234567891011121314151617181920212223242526272829303132 | [[modules-scripting-painless]]== Painless scripting language_Painless_ is a simple, secure scripting language designed specifically for usewith Elasticsearch. It is the default scripting language for Elasticsearch andcan safely be used for inline and stored scripts. To get started withPainless, see the {painless}/painless-guide.html[Painless Guide]. For adetailed description of the Painless syntax and language features, see the{painless}/painless-lang-spec.html[Painless Language Specification].[[painless-features]]You can use Painless anywhere scripts can be used in Elasticsearch. Painlessprovides:* Fast performance: Painless scripts https://benchmarks.elastic.co/index.html#search_qps_scripts[run several times faster] than the alternatives.* Safety: Fine-grained allowlists with method call/field granularity. See the{painless}/painless-api-reference.html[Painless API Reference] for acomplete list of available classes and methods.* Optional typing: Variables and parameters can use explicit types or thedynamic `def` type.* Syntax: Extends a subset of Java's syntax to provide additional scriptinglanguage features.* Optimizations: Designed specifically for Elasticsearch scripting.Ready to start scripting with Painless? See the{painless}/painless-guide.html[Painless Guide] for the{painless}/index.html[Painless Scripting Language].
 |