painless.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. [[modules-scripting-painless]]
  2. == Painless scripting language
  3. _Painless_ is a simple, secure scripting language designed specifically for use
  4. with Elasticsearch. It is the default scripting language for Elasticsearch and
  5. can safely be used for inline and stored scripts. To get started with
  6. Painless, see the {painless}/painless-guide.html[Painless Guide]. For a
  7. detailed description of the Painless syntax and language features, see the
  8. {painless}/painless-lang-spec.html[Painless Language Specification].
  9. [[painless-features]]
  10. You can use Painless anywhere scripts can be used in Elasticsearch. Painless
  11. provides:
  12. * Fast performance: Painless scripts https://benchmarks.elastic.co/index.html#search_qps_scripts[
  13. run several times faster] than the alternatives.
  14. * Safety: Fine-grained whitelist with method call/field granularity. See the
  15. {painless}/painless-api-reference.html[Painless API Reference] for a
  16. complete list of available classes and methods.
  17. * Optional typing: Variables and parameters can use explicit types or the
  18. dynamic `def` type.
  19. * Syntax: Extends a subset of Java's syntax to provide additional scripting
  20. language features.
  21. * Optimizations: Designed specifically for Elasticsearch scripting.
  22. Ready to start scripting with Painless? See the
  23. {painless}/painless-guide.html[Painless Guide] for the
  24. {painless}/index.html[Painless Scripting Language].