Skip to content

Commit 8ad10fb

Browse files
committed
Improve/fix documentation on stored scripts
1 parent 7b6d4d1 commit 8ad10fb

File tree

2 files changed

+112
-105
lines changed

2 files changed

+112
-105
lines changed

docs/reference/scripting/using.asciidoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,15 @@ when you're creating <<runtime-mapping-fields,runtime fields>>.
201201
[[script-stored-scripts]]
202202
=== Store and retrieve scripts
203203
You can store and retrieve scripts from the cluster state using the
204-
<<stored-script-apis,stored script APIs>>. Stored scripts reduce compilation
205-
time and make searches faster.
204+
<<stored-script-apis,stored script APIs>>. Stored scripts make it easier for
205+
several people to collaborate on queries that involve scripting. The
206+
person in charge of writing the queries can simply reference scripts (for
207+
scoring, aggregating, filtering, reindexing, etc) written by another person
208+
instead of inlining them within the queries.
209+
210+
Stored scripts also contribute to reducing the request payload. Depending
211+
on the size of the scripts and the frequency of the requests, that can
212+
help lowering the request latency and data transfer costs.
206213

207214
NOTE: Unlike regular scripts, stored scripts require that you specify a script
208215
language using the `lang` parameter.

0 commit comments

Comments
 (0)