elasticsearch/docs/reference/scripting/painless.asciidoc
Adam Locke aba4422606
[DOCS] Focus scripting docs on Painless (#69748)
* Initial changes for scripting.

* Shorten script examples.

* Expanding types docs.

* Updating types.

* Fixing broken cross-link.

* Fixing map error.

* Incorporating review feedback.

* Fixing broken table.

* Adding more info about reference types.

* Fixing broken path.

* Adding more info an examples for def type.

* Adding more info on operators.

* Incorporating review feedback.

* Adding notconsole for example.

* Removing comments in example.

* More review feedback.

* Editorial changes.

* Incorporating more reviewer feedback.

* Rewrites based on review feedback.

* Adding new sections for storing scripts and shortening scripts.

* Adding redirect for stored scripts.

* Adding DELETE for stored script plus link.

* Adding section for updating docs with scripts.

* Incorporating final feedback from reviews.

* Tightening up a few areas.

* Minor change around other languages.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-18 15:58:33 -04:00

34 lines
1.5 KiB
Text

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