Spec-Zone.ru › Elasticsearch 7
›Elasticsearch Guide [7.17] ›Scripting

Painless scripting language

Painless is a performant, secure scripting language designed specifically for Elasticsearch. You can use Painless to safely write inline and stored scripts anywhere scripts are supported in Elasticsearch.

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 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.

Start scripting

Ready to start scripting with Painless? Learn how to write your first script.

If you’re already familiar with Painless, see the Painless Language Specification for a detailed description of the Painless syntax and language features.

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-scripting-painless.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API