OpenSearch/docs/reference
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
..
aggregations Build fix for broken docs build 2017-01-31 10:27:06 +00:00
analysis Fix incorrect heading for Whitespace Tokenizer (#22883) 2017-01-31 12:51:37 +01:00
cat Fix duplicates from search.query (#22701) 2017-01-20 18:45:10 +01:00
cluster Docs: Cluster allocation explain should be on one page 2017-01-26 11:38:19 +01:00
docs Fix formatting in update-by-query (#22628) 2017-01-16 12:44:51 +01:00
how-to Improve wording in recipes docs 2017-01-17 21:00:36 -05:00
images Docs: clarify calculation of sigma and lambda in function_score (#20267) 2016-09-02 14:41:07 +02:00
index-modules Restores the original default format of search slow log 2016-12-09 12:38:28 -05:00
indices Minor fix in Create Index desc (#22877) 2017-01-31 12:53:15 +01:00
ingest Link directly to the attachments in arrays section 2016-12-22 20:52:08 +08:00
mapping Update type-field.asciidoc 2017-01-27 17:50:28 +01:00
migration Merge branch 'pr/remove-azure-container-auto-creation' 2017-01-31 09:05:43 +01:00
modules Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
painless-api-reference Add remaining generated painless API 2017-01-26 10:43:22 -05:00
query-dsl Docs: Add a note about `<` and `>` in query_string 2017-01-31 12:23:18 -05:00
search Integrate UnifiedHighlighter (#21621) 2017-01-31 19:06:03 +01:00
setup Docs: Add setup section for the keystore tool and secure settings (#22838) 2017-01-30 14:56:45 -08:00
testing Update docs after test-framework moved 2016-11-02 09:51:55 -04:00
aggregations.asciidoc `value_type` is useful regardless of scripting. (#22160) 2016-12-22 14:35:12 +01:00
analysis.asciidoc Add the ability to set an analyzer on keyword fields. (#21919) 2016-12-30 09:36:10 +01:00
api-conventions.asciidoc Make boolean conversion strict (#22200) 2017-01-19 07:59:18 +01:00
cat.asciidoc Allows multiple patterns to be specified for index templates (#21009) 2016-11-10 18:00:30 -05:00
cluster.asciidoc Convert more docs to CONSOLE 2016-09-21 09:36:21 -04:00
docs.asciidoc Inclusion of link to Multi Delete (#22619) 2017-01-16 12:58:59 +01:00
getting-started.asciidoc Corrected a plural verb to a singular one. (#22681) 2017-01-20 19:00:10 +01:00
glossary.asciidoc Improve glossary to not refer to types as "like a table" (#17704) 2016-04-13 14:29:47 +02:00
how-to.asciidoc Correct grammar in list in how-to docs 2017-01-17 20:57:22 -05:00
index-modules.asciidoc Allow an index to be partitioned with custom routing (#22274) 2017-01-18 08:51:23 +01:00
index.asciidoc Generate reference links for painless API (#22775) 2017-01-26 10:39:19 -05:00
indices.asciidoc Removed the upgrade API docs 2016-10-11 12:21:46 +02:00
ingest.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
mapping.asciidoc Disable _all by default 2017-01-11 16:47:13 -07:00
modules.asciidoc Docs: Cross-cluster search doc wasn't being included 2017-01-18 10:02:51 +01:00
painless-api-reference.asciidoc Generate reference links for painless API (#22775) 2017-01-26 10:39:19 -05:00
query-dsl.asciidoc Fixed broken xrefs to query-dsl-not-query, which has been removed. 2015-10-20 13:01:37 -07:00
redirects.asciidoc Remove indices query (#21837) 2016-11-30 19:37:01 +01:00
release-notes.asciidoc Remove links to release notes 2016-09-08 18:07:39 +02:00
search.asciidoc percolator: remove deprecated percolate and mpercolate apis 2017-01-10 11:18:27 +01:00
setup.asciidoc Docs: Add setup section for the keystore tool and secure settings (#22838) 2017-01-30 14:56:45 -08:00
testing.asciidoc [DOCS] Test framework documentation 2013-12-02 18:01:45 +01:00