painless.asciidoc 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. [[modules-scripting-painless]]
  2. == Painless scripting language
  3. _Painless_ is a performant, secure scripting language designed specifically for
  4. {es}. You can use Painless to safely write inline and stored scripts anywhere
  5. scripts are supported in {es}.
  6. [[painless-features]]
  7. Painless provides numerous capabilities that center around the following
  8. core principles:
  9. * **Safety**: Ensuring the security of your cluster is of utmost importance. To
  10. that end, Painless uses a fine-grained allowlist with a granularity down to the
  11. members of a class. Anything that is not part of the allowlist results in a
  12. compilation error. See the
  13. {painless}/painless-api-reference.html[Painless API Reference]
  14. for a complete list of available classes, methods, and fields per script
  15. context.
  16. * **Performance**: Painless compiles directly into JVM bytecode to take
  17. advantage of all possible optimizations that the JVM provides. Also, Painless
  18. typically avoids features that require additional slower checks at runtime.
  19. * **Simplicity**: Painless implements a syntax with a natural familiarity to
  20. anyone with some basic coding experience. Painless uses a subset of Java syntax
  21. with some additional improvements to enhance readability and remove
  22. boilerplate.
  23. [discrete]
  24. === Start scripting
  25. Ready to start scripting with Painless? Learn how to
  26. <<modules-scripting-using,write your first script>>.
  27. If you're already familiar with Painless, see the
  28. {painless}/painless-lang-spec.html[Painless Language Specification] for a
  29. detailed description of the Painless syntax and language features.