elasticsearch/docs/reference/modules
Jack Conradson 3d2626c4c6 Change Namespace for Stored Script to Only Use Id (#22206)
Currently, stored scripts use a namespace of (lang, id) to be put, get, deleted, and executed. This is not necessary since the lang is stored with the stored script. A user should only have to specify an id to use a stored script. This change makes that possible while keeping backwards compatibility with the previous namespace of (lang, id). Anywhere the previous namespace is used will log deprecation warnings.

The new behavior is the following:

When a user specifies a stored script, that script will be stored under both the new namespace and old namespace.

Take for example script 'A' with lang 'L0' and data 'D0'. If we add script 'A' to the empty set, the scripts map will be ["A" -- D0, "A#L0" -- D0]. If a script 'A' with lang 'L1' and data 'D1' is then added, the scripts map will be ["A" -- D1, "A#L1" -- D1, "A#L0" -- D0].

When a user deletes a stored script, that script will be deleted from both the new namespace (if it exists) and the old namespace.

Take for example a scripts map with {"A" -- D1, "A#L1" -- D1, "A#L0" -- D0}. If a script is removed specified by an id 'A' and lang null then the scripts map will be {"A#L0" -- D0}. To remove the final script, the deprecated namespace must be used, so an id 'A' and lang 'L0' would need to be specified.

When a user gets/executes a stored script, if the new namespace is used then the script will be retrieved/executed using only 'id', and if the old namespace is used then the script will be retrieved/executed using 'id' and 'lang'
2017-01-31 13:27:02 -08:00
..
cluster [DOCS] fixes word usage in allocation awareness docs 2016-11-25 11:47:40 -05:00
discovery Fix default port for unicast zen ping hosts 2017-01-11 17:10:56 -05:00
indices Updated document as per code change. (#22878) 2017-01-31 13:36:09 +01:00
scripting Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
cluster.asciidoc Fix typo in cluster module docs 2016-07-12 16:32:23 -04:00
cross-cluster-search.asciidoc Docs: Made cross-cluster search experimental 2017-01-24 12:44:01 +01:00
discovery.asciidoc [DOCS] add azure and gce discovery plugins 2014-02-06 09:18:42 +01:00
gateway.asciidoc Update gateway.asciidoc (#19572) 2016-07-28 13:09:05 +02:00
http.asciidoc Clarifies the documentation for the http.cors.enabled setting (#19890) 2016-08-09 12:54:38 -05:00
indices.asciidoc Fix doc build. 2016-06-22 09:34:49 +02:00
memcached.asciidoc Fix organization rename in all files in project 2016-03-03 12:04:13 -07:00
network.asciidoc Document using round-robin DNS for discovery (#21810) 2016-12-14 11:29:39 +01:00
node.asciidoc Fix typos (#21456) 2016-11-10 11:55:04 +01:00
plugins.asciidoc Docs: Prepare plugin and integration docs for 2.0 2015-08-15 18:02:43 +02:00
scripting.asciidoc Remove groovy scripting language (#21607) 2016-11-22 19:24:12 -08:00
snapshots.asciidoc [Docs] Correct setting name in snapshot/restore documentation (#22023) 2016-12-07 14:12:10 +01:00
threadpool.asciidoc percolator: remove deprecated percolate and mpercolate apis 2017-01-10 11:18:27 +01:00
thrift.asciidoc Fix organization rename in all files in project 2016-03-03 12:04:13 -07:00
transport.asciidoc Remove LocalTransport in favor of MockTcpTransport (#20695) 2016-10-07 11:27:47 +02:00
tribe.asciidoc Remove custom plugins path 2016-05-26 10:16:25 -04:00