[DOCS] Improve/fix documentation on stored scripts (#119921) (#119971)

* Improve/fix documentation on stored scripts

* Update docs/reference/scripting/using.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Update docs/reference/scripting/using.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Update docs/reference/transform/painless-examples.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
(cherry picked from commit 1e608dc223)

Co-authored-by: Valentin Crettaz <valentin.crettaz@consulthys.com>
This commit is contained in:
Liam Thompson 2025-01-10 18:17:15 +01:00 committed by GitHub
parent 1b2772e901
commit be6a058a67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 110 additions and 105 deletions

View file

@ -201,8 +201,13 @@ when you're creating <<runtime-mapping-fields,runtime fields>>.
[[script-stored-scripts]]
=== Store and retrieve scripts
You can store and retrieve scripts from the cluster state using the
<<stored-script-apis,stored script APIs>>. Stored scripts reduce compilation
time and make searches faster.
<<stored-script-apis,stored script APIs>>. Stored scripts allow you to reference
shared scripts for operations like scoring, aggregating, filtering, and
reindexing. Instead of embedding scripts inline in each query, you can reference
these shared operations.
Stored scripts can also reduce request payload size. Depending on script size
and request frequency, this can help lower latency and data transfer costs.
NOTE: Unlike regular scripts, stored scripts require that you specify a script
language using the `lang` parameter.