OpenSearch/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
..
aggs-matrix-stats Remove InternalAggregation.Type (#22511) 2017-01-10 11:57:19 -05:00
ingest-common Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
lang-expression Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
lang-mustache Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
lang-painless Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
percolator replace custom functional interface with CheckedFunction in percolate module 2017-01-16 13:57:58 +01:00
reindex Move delete by query helpers into core (#22810) 2017-01-27 16:09:18 -05:00
repository-url Add repository-url module and move URLRepository (#22752) 2017-01-25 17:09:25 -06:00
transport-netty4 Add single static instance of SpecialPermission (#22726) 2017-01-21 12:03:52 -06:00
build.gradle Build: Change `gradle run` to use zip distribution (#21001) 2016-10-18 11:48:58 -07:00