Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.6 KB

File metadata and controls

28 lines (20 loc) · 1.6 KB
mapped_pages
applies_to
stack serverless
ga
ga
products
id
elasticsearch

Scripting [modules-scripting]

With scripting, you can evaluate custom expressions in {{es}}. For example, you can use a script to return a computed value as a field or evaluate a custom score for a query.

The default scripting language is Painless. Additional lang plugins are available to run scripts written in other languages. You can specify the language of the script anywhere that scripts run.

Available scripting languages [scripting-available-languages]

Painless is purpose-built for {{es}}, can be used for any purpose in the scripting APIs, and provides the most flexibility. The other languages are less flexible, but can be useful for specific purposes.

Language Sandboxed Required plugin Purpose
painless Yes Built-in Purpose-built for {{es}}
expression Yes Built-in Fast custom ranking and sorting
mustache Yes Built-in Templates
java No Not available Expert API