OpenSearch/docs/reference
Martijn van Groningen 6aa9aaa2c6
Add validation for dynamic templates (#52890)
Backport of #51233 to the seven dot x branch.

Tries to load a `Mapper` instance for the mapping snippet of a dynamic template.
This should catch things like using an analyzer that is undefined or mapping attributes that are unused.

This is best effort:
* If `{{name}}` placeholder is used in the mapping snippet then validation is skipped.
* If `match_mapping_type` is not specified then validation is performed for all mapping types.
  If parsing succeeds with a single mapping type then this the dynamic mapping is considered valid.

If is detected that a dynamic template mapping snippet is invalid at mapping update time then the mapping update is failed for indices created on 8.0.0-alpha1 and later. For indices created on prior version a deprecation warning is omitted instead. In 7.x clusters the mapping update will never fail in case of an invalid dynamic template mapping snippet and a deprecation warning will always be omitted.

Closes #17411
Closes #24419

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2020-02-28 10:35:04 +01:00
..
aggregations Add size support to `top_metrics` (backport of #52662) (#52914) 2020-02-27 16:12:52 -05:00
analysis [DOCS] Fixed typo in jump link. (#52302) 2020-02-12 17:53:00 -08:00
autoscaling Add autoscaling API skelton (#51564) 2020-02-06 21:55:01 -05:00
cat [DOCS] Reformats cat DFA API docs. (#52885) 2020-02-27 14:21:52 +01:00
ccr Remove outdated requirement of CCR (#50859) 2020-01-13 20:00:23 -05:00
cluster [DOCS] Fix typo in task management API docs (#52881) 2020-02-27 11:31:11 -05:00
commands [Docs] Fix typo in node-tool.asciidoc (#51667) 2020-01-31 10:36:21 +01:00
docs [DOCS] Update term vectors snippet to prevent CI failure (#52819) 2020-02-26 12:41:40 -05:00
eql EQL: Hook engine to Elasticsearch (#52828) 2020-02-27 11:22:22 +02:00
graph [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
high-availability [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
how-to Clarify the resiliency trade-off of disabling replicas to speed up indexing. (#52714) 2020-02-25 08:54:10 +01:00
ilm [DOCS] Correct policy name in ILM docs example (#52354) 2020-02-25 09:36:22 -05:00
images SQL: update ODBC docs, cover Cloud ID, latest params (#52291) 2020-02-19 17:42:28 +01:00
index-modules Discourage from opting in for the `niofs` store. (#52638) 2020-02-25 08:54:11 +01:00
indices [Docs] Clarify default value for `allow_no_indices` (#52635) (#52697) 2020-02-24 11:57:32 +01:00
ingest [DOS] Fix typo in CSV processor docs (#52649) 2020-02-25 08:48:50 -05:00
licensing [DOCS] Augments update license API (#51903) 2020-02-05 11:08:11 -08:00
mapping Add validation for dynamic templates (#52890) 2020-02-28 10:35:04 +01:00
migration Clarified http.max_content_length description (#52329) 2020-02-24 21:01:14 -05:00
ml [ML] Add indices_options to datafeed config and update (#52793) (#52905) 2020-02-27 13:43:25 -05:00
modules "Adding nodes" instructions only work on localhost (#52677) 2020-02-27 09:18:37 +00:00
monitoring [DOCS] Fixes monitoring links (#52790) 2020-02-25 18:08:23 -08:00
query-dsl Correct boost calculation in script_score query (#52478) (#52724) 2020-02-24 13:48:21 -05:00
release-notes Add validation for dynamic templates (#52890) 2020-02-28 10:35:04 +01:00
rest-api Correct the name of the search timeout parameter. (#52733) 2020-02-24 14:59:06 -08:00
rollup [DOCS] Merge rollup config details into API (#49412) 2019-11-22 08:39:49 -08:00
scripting Scripting: Add char position of script errors (#51069) (#51266) 2020-01-21 13:45:59 -07:00
search Adds recall@k metric to rank eval API (#52889) 2020-02-27 16:04:24 +01:00
settings Update ilm-settings.asciidoc (#51577) 2020-02-25 10:18:55 -05:00
setup "Adding nodes" instructions only work on localhost (#52677) 2020-02-27 09:18:37 +00:00
slm Correct SLM retention timezone documentation (#52533) 2020-02-19 13:46:43 -07:00
snapshot-restore Backporting updates to ILM org, overview, & GS (#51898) 2020-02-04 16:45:18 -08:00
sql remove references to the SQL API from ODBC config (#52765) 2020-02-26 13:39:54 +01:00
testing Uppercasing some docs section title (#37781) 2019-01-24 22:54:55 +01:00
transform [DOCS] Correct important note for xpack.transform.enabled (#52194) 2020-02-11 13:02:10 +00:00
upgrade Deprecate synced flush (#50835) 2020-01-13 19:54:38 -05:00
vectors Remove the 'experimental' marking from vector fields. (#49120) 2019-11-18 12:42:46 -08:00
aggregations.asciidoc [Docs] Update aggregations.asciidoc (#29265) 2018-03-28 15:01:45 +02:00
analysis.asciidoc [DOCS] Add attribute for Lucene analysis links (#51687) 2020-01-30 11:24:01 -05:00
api-conventions.asciidoc [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
cat.asciidoc [DOCS] Adds cat trained model API documentation (#52824) 2020-02-27 12:54:11 +01:00
cluster.asciidoc Password-protected Keystore Feature Branch PR (#51123) (#51510) 2020-01-28 05:32:32 -05:00
data-rollup-transform.asciidoc [DOCS] Adds transforms to Elasticsearch book (#46846) (#47055) 2019-09-25 08:11:37 -07:00
docs.asciidoc [DOCS] Remove heading offsets for REST APIs (#44568) 2019-07-19 14:36:06 -04:00
frozen-indices.asciidoc [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
getting-started.asciidoc [DOCS] Switch to standard ESS trial links (#52552) 2020-02-21 12:07:10 -05:00
glossary.asciidoc Backporting updates to ILM org, overview, & GS (#51898) 2020-02-04 16:45:18 -08:00
gs-index.asciidoc [DOCS] Adding index file for GS "mini book". 2017-07-18 13:44:08 -07:00
high-availability.asciidoc [DOCS] Remove leveloffset for CCR docs (#46818) 2019-09-18 09:44:43 -04:00
how-to.asciidoc Correct grammar in list in how-to docs 2017-01-17 20:57:22 -05:00
index-modules.asciidoc Deprecate creation of dot-prefixed index names except for hidden and system indices (#49959) 2020-01-28 10:01:16 -07:00
index.asciidoc [DOCS] Include docs on permanently unreleased branches only (#51743) 2020-02-11 11:24:13 -05:00
index.x.asciidoc [DOCS] Removes redundant index.asciidoc files (#30707) 2018-05-18 11:05:40 -07:00
indices.asciidoc [DOCS] Reorder index APIs alphabetically (#46981) (#47402) 2019-10-01 17:07:28 -04:00
ingest.asciidoc Replace required pipeline with final pipeline (#49470) 2019-11-22 14:37:36 -05:00
intro.asciidoc [7.x][DOCS] Updates ML links (#50387) (#50409) 2019-12-20 10:01:19 -08:00
mapping.asciidoc [DOCS] Note clause limit in `index.mapping.total_fields.limit` docs (#48153) 2019-10-18 10:20:49 -04:00
modules.asciidoc Backporting updates to ILM org, overview, & GS (#51898) 2020-02-04 16:45:18 -08:00
query-dsl.asciidoc Add a cluster setting to disallow expensive queries (#51385) (#52279) 2020-02-12 22:56:14 +01:00
redirects.asciidoc [7.x] [DOCS] Re-add redirects for API relocation (#52628) 2020-02-21 05:32:10 -05:00
release-notes.asciidoc [DOCS] Adds placeholder for 7.5.2 release notes (#51124) 2020-01-16 14:42:24 -05:00
scripting.asciidoc [DOCS] Move 'Scripting' section to top-level navigation. (#42939) 2019-06-06 10:46:02 -04:00
search.asciidoc Use snake casing for document field (#45432) 2019-09-19 14:27:00 +02:00
setup.asciidoc [DOCS] Creates a cluster restart documentation page (#48583) 2019-11-12 14:50:53 +01:00
testing.asciidoc [Docs] Unify spelling of Elasticsearch (#27567) 2017-11-29 09:44:25 +01:00
upgrade.asciidoc [DOCS] Change prev version to 7.5 in upgrade docs (#48415) 2019-10-23 12:09:26 -05:00