painless-guide.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829
  1. [[painless-guide]]
  2. == Painless Guide
  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. For a jump start into
  6. Painless, see <<painless-walkthrough, A Brief Painless Walkthrough>>. For a
  7. detailed description of the Painless syntax and language features, see the
  8. <<painless-lang-spec, Painless Language Specification>>.
  9. You can use Painless anywhere scripts are used in Elasticsearch. Painless
  10. provides:
  11. * Fast performance: Painless scripts https://benchmarks.elastic.co/index.html#search_qps_scripts[
  12. run several times faster] than the alternatives.
  13. * Safety: Fine-grained allowlist with method call/field granularity. See the
  14. {painless}/painless-api-reference.html[Painless API Reference] for a
  15. complete list of available classes and methods.
  16. * Optional typing: Variables and parameters can use explicit types or the
  17. dynamic `def` type.
  18. * Syntax: Extends a subset of Java's syntax to provide additional scripting
  19. language features.
  20. * Optimizations: Designed specifically for Elasticsearch scripting.
  21. include::painless-guide/index.asciidoc[]