diff --git a/modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/top_hits.yml b/modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/top_hits.yml index ed24e1cc8404c..91e9b04e35860 100644 --- a/modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/top_hits.yml +++ b/modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/top_hits.yml @@ -356,9 +356,10 @@ synthetic _source: indices.create: index: test_synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: page: type: keyword diff --git a/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml index ee6803d809087..4e31c1ba36601 100644 --- a/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml +++ b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/50_script_doc_values.yml @@ -180,9 +180,9 @@ setup: body: settings: number_of_shards: 1 + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: boolean: type: boolean @@ -5630,9 +5630,9 @@ version and sequence number synthetic _source: body: settings: number_of_shards: 1 + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: keyword: type: keyword diff --git a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml index b4ee226f72692..4a6810faab215 100644 --- a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml +++ b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/match_only_text/10_basic.yml @@ -285,9 +285,10 @@ synthetic_source: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: foo: type: match_only_text @@ -362,9 +363,10 @@ synthetic_source with copy_to: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: foo: type: match_only_text diff --git a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/30_synthetic_source.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/30_synthetic_source.yml index 1e0b90ebb9e0f..e6df05189b6f9 100644 --- a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/30_synthetic_source.yml +++ b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_feature/30_synthetic_source.yml @@ -7,9 +7,10 @@ setup: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: pagerank: type: rank_feature diff --git a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/20_synthetic_source.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/20_synthetic_source.yml index c64e35cc2cea4..6ffe896408079 100644 --- a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/20_synthetic_source.yml +++ b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/rank_features/20_synthetic_source.yml @@ -7,9 +7,10 @@ setup: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: tags: type: rank_features diff --git a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/30_synthetic_source.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/30_synthetic_source.yml index 75397bd9e0fe9..b764e14c8ced1 100644 --- a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/30_synthetic_source.yml +++ b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/search-as-you-type/30_synthetic_source.yml @@ -7,9 +7,10 @@ setup: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: a_field: type: search_as_you_type diff --git a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/token_count/10_basic.yml b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/token_count/10_basic.yml index 03b72a2623497..a870cd4d01abc 100644 --- a/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/token_count/10_basic.yml +++ b/modules/mapper-extras/src/yamlRestTest/resources/rest-api-spec/test/token_count/10_basic.yml @@ -42,9 +42,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: count: type: token_count diff --git a/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/60_synthetic_source.yml b/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/60_synthetic_source.yml index 12d0f1bbae6c7..5eb5739222905 100644 --- a/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/60_synthetic_source.yml +++ b/modules/parent-join/src/yamlRestTest/resources/rest-api-spec/test/60_synthetic_source.yml @@ -7,9 +7,10 @@ supported: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: join_field: type: join diff --git a/modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml b/modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml index a5576d203314f..93ecaaa66bb91 100644 --- a/modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml +++ b/modules/percolator/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml @@ -137,9 +137,10 @@ indices.create: index: queries_index body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: query: type: percolator diff --git a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/110_synthetic_source.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/110_synthetic_source.yml index 9ae2153f89ca5..db78af6719c1f 100644 --- a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/110_synthetic_source.yml +++ b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/110_synthetic_source.yml @@ -3,9 +3,10 @@ setup: indices.create: index: synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword diff --git a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/100_synthetic_source.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/100_synthetic_source.yml index 4329bf8ed471a..a17f29a2d52e7 100644 --- a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/100_synthetic_source.yml +++ b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/update_by_query/100_synthetic_source.yml @@ -3,9 +3,10 @@ update: indices.create: index: synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword diff --git a/modules/runtime-fields-common/src/yamlRestTest/resources/rest-api-spec/test/runtime_fields/270_synthetic_source.yml b/modules/runtime-fields-common/src/yamlRestTest/resources/rest-api-spec/test/runtime_fields/270_synthetic_source.yml index 8832b3230910c..0a3e372d2d8e4 100644 --- a/modules/runtime-fields-common/src/yamlRestTest/resources/rest-api-spec/test/runtime_fields/270_synthetic_source.yml +++ b/modules/runtime-fields-common/src/yamlRestTest/resources/rest-api-spec/test/runtime_fields/270_synthetic_source.yml @@ -8,9 +8,10 @@ keywords: indices.create: index: index1 body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: field1: type: keyword @@ -76,9 +77,10 @@ doubles: indices.create: index: index1 body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: field1: type: double diff --git a/plugins/mapper-annotated-text/src/yamlRestTest/resources/rest-api-spec/test/mapper_annotatedtext/20_synthetic_source.yml b/plugins/mapper-annotated-text/src/yamlRestTest/resources/rest-api-spec/test/mapper_annotatedtext/20_synthetic_source.yml index 4aac881700e15..1d5f1daad9958 100644 --- a/plugins/mapper-annotated-text/src/yamlRestTest/resources/rest-api-spec/test/mapper_annotatedtext/20_synthetic_source.yml +++ b/plugins/mapper-annotated-text/src/yamlRestTest/resources/rest-api-spec/test/mapper_annotatedtext/20_synthetic_source.yml @@ -10,9 +10,10 @@ stored annotated_text field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -40,9 +41,10 @@ annotated_text field with keyword multi-field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -72,9 +74,10 @@ multiple values in stored annotated_text field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -102,9 +105,10 @@ multiple values in annotated_text field with keyword multi-field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -135,9 +139,10 @@ multiple values in annotated_text field with stored keyword multi-field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -169,9 +174,10 @@ multiple values in stored annotated_text field with keyword multi-field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text @@ -202,9 +208,10 @@ fallback synthetic source: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: annotated_text: type: annotated_text diff --git a/plugins/mapper-murmur3/src/yamlRestTest/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml b/plugins/mapper-murmur3/src/yamlRestTest/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml index 12b23fb3b0395..6873145d39d5c 100644 --- a/plugins/mapper-murmur3/src/yamlRestTest/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml +++ b/plugins/mapper-murmur3/src/yamlRestTest/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml @@ -134,9 +134,10 @@ setup: indices.create: index: test_synthetic_source body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: foo: type: keyword diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get/100_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get/100_synthetic_source.yml index a7600da575cd3..7ca7580b0d5ca 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get/100_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/get/100_synthetic_source.yml @@ -7,9 +7,10 @@ keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -48,9 +49,8 @@ fetch without refresh also produces synthetic source: settings: index: refresh_interval: -1 + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: obj: properties: @@ -90,9 +90,10 @@ force_synthetic_source_ok: indices.create: index: test body: + settings: + index: + mapping.source.mode: stored mappings: - _source: - mode: stored properties: obj: properties: @@ -139,9 +140,10 @@ stored text: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: text: type: text @@ -212,9 +214,10 @@ stored keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -253,9 +256,10 @@ doc values keyword with ignore_above: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -336,9 +340,10 @@ stored keyword with ignore_above: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -421,9 +426,10 @@ indexed dense vectors: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -465,9 +471,10 @@ non-indexed dense vectors: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -508,9 +515,10 @@ _source filtering: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -550,9 +558,9 @@ _doc_count: indices.create: index: test body: - mappings: - _source: - mode: synthetic + settings: + index: + mapping.source.mode: synthetic # with _doc_count - do: @@ -679,9 +687,10 @@ fields with ignore_malformed: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: ip: type: ip @@ -914,9 +923,10 @@ flattened field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: flattened: type: flattened @@ -1006,9 +1016,10 @@ flattened field with ignore_above: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: field: type: flattened @@ -1061,9 +1072,10 @@ flattened field with ignore_above and arrays: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: field: type: flattened @@ -1117,9 +1129,10 @@ completion: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: completion: type: completion diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/20_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/20_synthetic_source.yml index cc5fd0e08e695..15a712d77a7ef 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/20_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/20_synthetic_source.yml @@ -11,13 +11,11 @@ object with unmapped fields: settings: index: mapping: + source.mode: synthetic total_fields: ignore_dynamic_beyond_limit: true limit: 1 - mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -64,13 +62,12 @@ unmapped arrays: settings: index: mapping: + source.mode: synthetic total_fields: ignore_dynamic_beyond_limit: true limit: 1 mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -111,13 +108,12 @@ nested object with unmapped fields: settings: index: mapping: + source.mode: synthetic total_fields: ignore_dynamic_beyond_limit: true limit: 3 mappings: - _source: - mode: synthetic properties: path: properties: @@ -163,13 +159,12 @@ empty object with unmapped fields: settings: index: mapping: + source.mode: synthetic total_fields: ignore_dynamic_beyond_limit: true limit: 3 mappings: - _source: - mode: synthetic properties: path: properties: @@ -205,9 +200,10 @@ disabled root object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic enabled: false - do: @@ -242,9 +238,10 @@ disabled object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: enabled: false @@ -279,9 +276,10 @@ disabled object contains array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: enabled: false @@ -319,9 +317,10 @@ disabled subobject: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: properties: @@ -357,9 +356,10 @@ disabled subobject with array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: properties: @@ -396,9 +396,10 @@ mixed disabled and enabled objects: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: properties: @@ -442,9 +443,10 @@ object with dynamic override: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path_no: dynamic: false @@ -489,9 +491,10 @@ subobject with dynamic override: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: properties: @@ -537,9 +540,10 @@ object array in object with dynamic override: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -591,9 +595,10 @@ value array in object with dynamic override: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path_no: dynamic: false @@ -634,9 +639,10 @@ nested object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: nested_field: type: nested @@ -679,9 +685,10 @@ nested object next to regular: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: path: properties: @@ -725,9 +732,10 @@ nested object with disabled: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: obj_field: properties: @@ -813,9 +821,10 @@ doubly nested object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: obj_field: properties: @@ -908,9 +917,10 @@ subobjects auto: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic subobjects: auto properties: id: @@ -996,9 +1006,10 @@ synthetic_source with copy_to: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: number: type: integer @@ -1132,9 +1143,10 @@ synthetic_source with disabled doc_values: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: number: type: integer @@ -1215,9 +1227,10 @@ fallback synthetic_source for text field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: text: type: text @@ -1249,9 +1262,10 @@ synthetic_source with copy_to and ignored values: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1317,9 +1331,10 @@ synthetic_source with copy_to field having values in source: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1380,9 +1395,10 @@ synthetic_source with ignored source field using copy_to: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1444,9 +1460,10 @@ synthetic_source with copy_to field from dynamic template having values in sourc indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic dynamic_templates: - copy_template: match: "k" @@ -1541,9 +1558,10 @@ synthetic_source with copy_to and invalid values for copy: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1577,9 +1595,10 @@ synthetic_source with copy_to pointing inside object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1681,9 +1700,10 @@ synthetic_source with copy_to pointing to ambiguous field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: k: type: keyword @@ -1728,9 +1748,10 @@ synthetic_source with copy_to pointing to ambiguous field and subobjects false: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic subobjects: false properties: k: @@ -1776,9 +1797,10 @@ synthetic_source with copy_to pointing to ambiguous field and subobjects auto: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic subobjects: auto properties: k: @@ -1825,9 +1847,10 @@ synthetic_source with copy_to pointing at dynamic field: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1911,9 +1934,10 @@ synthetic_source with copy_to pointing inside dynamic object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml index f3545bb0a3f0e..4f55b52224a38 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml @@ -8,9 +8,10 @@ object param - store complex object: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -72,9 +73,10 @@ object param - object array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -136,9 +138,10 @@ object param - object array within array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: stored: synthetic_source_keep: arrays @@ -179,9 +182,10 @@ object param - no object array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: stored: synthetic_source_keep: arrays @@ -221,9 +225,10 @@ object param - field ordering in object array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: a: type: keyword @@ -270,9 +275,10 @@ object param - nested object array next to other fields: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: a: type: keyword @@ -326,9 +332,10 @@ object param - nested object with stored array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -378,9 +385,10 @@ index param - nested array within array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -428,9 +436,9 @@ index param - nested array within array - disabled second pass: index: synthetic_source: enable_second_doc_parsing_pass: false + mapping.source.mode: synthetic + mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -478,9 +486,8 @@ stored field under object with store_array_source: index: sort.field: "name" sort.order: "asc" + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -525,9 +532,10 @@ field param - keep root array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -582,9 +590,10 @@ field param - keep nested array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -650,9 +659,10 @@ field param - keep root singleton fields: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -739,9 +749,10 @@ field param - keep nested singleton fields: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: id: type: integer @@ -820,9 +831,10 @@ field param - nested array within array: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -866,10 +878,9 @@ index param - root arrays: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: id: type: integer @@ -945,10 +956,9 @@ index param - dynamic root arrays: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: id: type: integer @@ -998,10 +1008,9 @@ index param - object array within array: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: stored: properties: @@ -1048,10 +1057,9 @@ index param - no object array: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: stored: properties: @@ -1093,10 +1101,9 @@ index param - field ordering: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: a: type: keyword @@ -1144,10 +1151,9 @@ index param - nested arrays: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: a: type: keyword @@ -1212,10 +1218,9 @@ index param - nested object with stored array: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -1264,10 +1269,9 @@ index param - flattened fields: settings: index: mapping: + source.mode: synthetic synthetic_source_keep: arrays mappings: - _source: - mode: synthetic properties: name: type: keyword diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml index 75d282d524607..67419cd18ad99 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml @@ -145,28 +145,6 @@ - is_false: test_index.mappings.properties.foo.meta.bar - match: { test_index.mappings.properties.foo.meta.baz: "quux" } ---- -"disabling synthetic source fails": - - requires: - cluster_features: ["gte_v8.4.0"] - reason: "Added in 8.4.0" - - - do: - indices.create: - index: test_index - body: - mappings: - _source: - mode: synthetic - - - do: - catch: /Cannot update parameter \[mode\] from \[synthetic\] to \[stored\]/ - indices.put_mapping: - index: test_index - body: - _source: - mode: stored - --- "enabling synthetic source from explicit succeeds": - requires: @@ -177,9 +155,9 @@ indices.create: index: test_index body: - mappings: - _source: - mode: stored + settings: + index: + mapping.source.mode: stored - do: indices.put_mapping: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb/20_source_mapping.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb/20_source_mapping.yml index b4709a4e4d176..e77f4a4c912b7 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb/20_source_mapping.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb/20_source_mapping.yml @@ -30,9 +30,7 @@ stored _source mode is supported: settings: index: mode: logsdb - mappings: - _source: - mode: stored + mapping.source.mode: stored - do: indices.get: index: test-stored-source @@ -69,9 +67,7 @@ disabled _source is not supported: settings: index: mode: logsdb - mappings: - _source: - mode: disabled + mapping.source.mode: disabled - match: { error.type: "mapper_parsing_exception" } - match: { error.root_cause.0.type: "mapper_parsing_exception" } @@ -120,9 +116,9 @@ include/exclude is supported with stored _source: settings: index: mode: logsdb + mapping.source.mode: stored mappings: _source: - mode: stored includes: [a] - do: @@ -139,9 +135,9 @@ include/exclude is supported with stored _source: settings: index: mode: logsdb + mapping.source.mode: stored mappings: _source: - mode: stored excludes: [b] - do: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/90_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/90_synthetic_source.yml index 2f3d2fa2f974d..c728252d98201 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/90_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/mget/90_synthetic_source.yml @@ -7,9 +7,10 @@ keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -62,9 +63,9 @@ keyword with normalizer: type: custom filter: - lowercase + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: keyword: type: keyword @@ -144,9 +145,10 @@ stored text: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: text: type: text @@ -193,9 +195,10 @@ force_synthetic_source_ok: indices.create: index: test body: + settings: + index: + mapping.source.mode: stored mappings: - _source: - mode: stored properties: obj: properties: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.highlight/50_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.highlight/50_synthetic_source.yml index a2fd448f5044d..024ce48562281 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.highlight/50_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.highlight/50_synthetic_source.yml @@ -9,9 +9,9 @@ setup: body: settings: number_of_shards: 1 + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: foo: type: keyword @@ -21,6 +21,7 @@ setup: index_options: positions vectors: type: text + store: false term_vector: with_positions_offsets positions: type: text diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/90_sparse_vector.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/90_sparse_vector.yml index 27f12f394c6a4..f4a55341dff08 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/90_sparse_vector.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/90_sparse_vector.yml @@ -394,9 +394,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: ml.tokens: type: sparse_vector diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/350_binary_field.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/350_binary_field.yml index 455d06ba2a984..ced9c4fe0825d 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/350_binary_field.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/350_binary_field.yml @@ -55,9 +55,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: binary: type: binary diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/400_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/400_synthetic_source.yml index 0cc1796bb47de..21338c12415d8 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/400_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/400_synthetic_source.yml @@ -7,9 +7,10 @@ keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -44,9 +45,10 @@ stored text: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: text: type: text @@ -83,8 +85,6 @@ stored keyword: index: test body: mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -120,9 +120,10 @@ stored keyword without sibling fields: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -165,9 +166,10 @@ force_synthetic_source_ok: indices.create: index: test body: + settings: + index: + mapping.source.mode: stored mappings: - _source: - mode: stored properties: obj: properties: @@ -218,9 +220,10 @@ doc values keyword with ignore_above: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -286,9 +289,10 @@ stored keyword with ignore_above: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -356,9 +360,10 @@ _source filtering: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -397,9 +402,9 @@ _doc_count: indices.create: index: test body: - mappings: - _source: - mode: synthetic + settings: + index: + mapping.source.mode: synthetic - do: index: diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/540_ignore_above_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/540_ignore_above_synthetic_source.yml index 435cda637cca6..8950a378c7203 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/540_ignore_above_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/540_ignore_above_synthetic_source.yml @@ -10,10 +10,9 @@ ignore_above mapping level setting: settings: index: mapping: + source.mode: synthetic ignore_above: 10 mappings: - _source: - mode: synthetic properties: keyword: type: keyword @@ -53,10 +52,9 @@ ignore_above mapping level setting on arrays: settings: index: mapping: + source.mode: synthetic ignore_above: 10 mappings: - _source: - mode: synthetic properties: keyword: type: keyword @@ -97,10 +95,9 @@ ignore_above mapping overrides setting: settings: index: mapping: + source.mode: synthetic ignore_above: 10 mappings: - _source: - mode: synthetic properties: keyword: type: keyword @@ -143,10 +140,9 @@ ignore_above mapping overrides setting on arrays: settings: index: mapping: + source.mode: synthetic ignore_above: 10 mappings: - _source: - mode: synthetic properties: keyword: type: keyword diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml index c5669cd6414b1..4fe4a7d2e2f51 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml @@ -472,9 +472,9 @@ stored source is supported: time_series: start_time: 2021-04-28T00:00:00Z end_time: 2021-04-29T00:00:00Z + mapping: + source.mode: stored mappings: - _source: - mode: stored properties: "@timestamp": type: date @@ -510,9 +510,9 @@ disabled source is not supported: time_series: start_time: 2021-04-28T00:00:00Z end_time: 2021-04-29T00:00:00Z + mapping: + source.mode: disabled mappings: - _source: - mode: disabled properties: "@timestamp": type: date diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/update/100_synthetic_source.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/update/100_synthetic_source.yml index f74fde7eb2a24..c3f013395ea36 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/update/100_synthetic_source.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/update/100_synthetic_source.yml @@ -7,9 +7,10 @@ keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: kwd: type: keyword @@ -65,9 +66,10 @@ stored text: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: text: type: text diff --git a/x-pack/plugin/logsdb/src/yamlRestTest/resources/rest-api-spec/test/20_ignored_source.yml b/x-pack/plugin/logsdb/src/yamlRestTest/resources/rest-api-spec/test/20_ignored_source.yml index 2f111d579ebb1..ff7f01fccaa3c 100644 --- a/x-pack/plugin/logsdb/src/yamlRestTest/resources/rest-api-spec/test/20_ignored_source.yml +++ b/x-pack/plugin/logsdb/src/yamlRestTest/resources/rest-api-spec/test/20_ignored_source.yml @@ -6,9 +6,10 @@ setup: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: object: enabled: false diff --git a/x-pack/plugin/mapper-constant-keyword/src/yamlRestTest/resources/rest-api-spec/test/20_synthetic_source.yml b/x-pack/plugin/mapper-constant-keyword/src/yamlRestTest/resources/rest-api-spec/test/20_synthetic_source.yml index b64fb7b822713..6cd30f42c52e9 100644 --- a/x-pack/plugin/mapper-constant-keyword/src/yamlRestTest/resources/rest-api-spec/test/20_synthetic_source.yml +++ b/x-pack/plugin/mapper-constant-keyword/src/yamlRestTest/resources/rest-api-spec/test/20_synthetic_source.yml @@ -7,9 +7,10 @@ constant_keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: const_kwd: type: constant_keyword diff --git a/x-pack/plugin/mapper-unsigned-long/src/yamlRestTest/resources/rest-api-spec/test/80_synthetic_source.yml b/x-pack/plugin/mapper-unsigned-long/src/yamlRestTest/resources/rest-api-spec/test/80_synthetic_source.yml index b88fca3c478a9..e8b86231b7196 100644 --- a/x-pack/plugin/mapper-unsigned-long/src/yamlRestTest/resources/rest-api-spec/test/80_synthetic_source.yml +++ b/x-pack/plugin/mapper-unsigned-long/src/yamlRestTest/resources/rest-api-spec/test/80_synthetic_source.yml @@ -7,9 +7,10 @@ synthetic source: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -52,9 +53,10 @@ synthetic source with copy_to: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -111,9 +113,10 @@ synthetic source with disabled doc_values: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword diff --git a/x-pack/plugin/mapper-version/src/yamlRestTest/resources/rest-api-spec/test/40_synthetic_source.yml b/x-pack/plugin/mapper-version/src/yamlRestTest/resources/rest-api-spec/test/40_synthetic_source.yml index 1ec91f5fde8d1..c96eeeb943831 100644 --- a/x-pack/plugin/mapper-version/src/yamlRestTest/resources/rest-api-spec/test/40_synthetic_source.yml +++ b/x-pack/plugin/mapper-version/src/yamlRestTest/resources/rest-api-spec/test/40_synthetic_source.yml @@ -7,9 +7,10 @@ setup: indices.create: index: test1 body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: ver: type: version @@ -76,9 +77,10 @@ synthetic source with copy_to: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: ver: type: version diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/aggregate-metrics/100_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/aggregate-metrics/100_synthetic_source.yml index cc0e8aff9b239..0937d24217e31 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/aggregate-metrics/100_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/aggregate-metrics/100_synthetic_source.yml @@ -7,9 +7,10 @@ aggregate_metric_double: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: metric: type: aggregate_metric_double @@ -62,9 +63,10 @@ aggregate_metric_double with ignore_malformed: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: metric: type: aggregate_metric_double diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/analytics/histogram.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/analytics/histogram.yml index 726b9d153025e..88445cbad1dc8 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/analytics/histogram.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/analytics/histogram.yml @@ -182,9 +182,10 @@ histogram with synthetic source: indices.create: index: histo_synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: latency: type: histogram @@ -228,9 +229,10 @@ histogram with synthetic source and zero counts: indices.create: index: histo_synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: latency: type: histogram @@ -317,9 +319,10 @@ histogram with synthetic source and ignore_malformed: indices.create: index: histo_synthetic body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: latency: type: histogram diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/enrich/40_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/enrich/40_synthetic_source.yml index 1c2e1cd922a65..1aaa39a0f13b7 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/enrich/40_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/enrich/40_synthetic_source.yml @@ -4,9 +4,10 @@ setup: indices.create: index: source body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: baz: type: keyword diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/30_types.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/30_types.yml index cfc7f2e4036fb..9658412f150fd 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/30_types.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/30_types.yml @@ -809,9 +809,10 @@ synthetic _source text stored: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: card: type: text @@ -840,9 +841,10 @@ synthetic _source text with parent keyword: indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: card: type: keyword diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/80_text.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/80_text.yml index 55bd39bdd73cc..ded66b9453452 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/80_text.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/80_text.yml @@ -481,9 +481,10 @@ setup: indices.create: index: test2 body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: "emp_no": type: long @@ -526,9 +527,10 @@ setup: indices.create: index: test2 body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: "emp_no": type: long diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/searchable_snapshots/20_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/searchable_snapshots/20_synthetic_source.yml index b1ab120fff441..df3c905408a87 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/searchable_snapshots/20_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/searchable_snapshots/20_synthetic_source.yml @@ -11,9 +11,9 @@ setup: settings: number_of_shards: 1 number_of_replicas: 0 + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: obj: properties: diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/30_field_level_security_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/30_field_level_security_synthetic_source.yml index b971c246ac50a..5e636aebc0271 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/30_field_level_security_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/30_field_level_security_synthetic_source.yml @@ -13,9 +13,10 @@ Filter single field: indices.create: index: index_fls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -75,9 +76,10 @@ Filter fields in object: indices.create: index: index_fls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -142,9 +144,10 @@ Fields under a disabled object - uses _ignored_source: indices.create: index: index_fls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -236,12 +239,11 @@ Dynamic fields beyond limit - uses _ignored_source: settings: index: mapping: + source.mode: synthetic total_fields: ignore_dynamic_beyond_limit: true limit: 2 mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -301,9 +303,10 @@ Field with ignored_malformed: indices.create: index: index_fls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/40_document_level_security_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/40_document_level_security_synthetic_source.yml index 52abe0a3d83d7..37e78d86f6667 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/40_document_level_security_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/security/authz_api_keys/40_document_level_security_synthetic_source.yml @@ -13,9 +13,10 @@ Filter on single field: indices.create: index: index_dls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -95,9 +96,10 @@ Filter on nested field: indices.create: index: index_dls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -178,9 +180,10 @@ Filter on object with stored source: indices.create: index: index_dls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -258,9 +261,10 @@ Filter on field within a disabled object: indices.create: index: index_dls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -335,9 +339,10 @@ Filter on field with ignored_malformed: indices.create: index: index_dls body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/snapshot/10_basic.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/snapshot/10_basic.yml index e1b297f1b5d78..6ccd24ae84af9 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/snapshot/10_basic.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/snapshot/10_basic.yml @@ -100,12 +100,11 @@ setup: indices.create: index: test_synthetic body: - mappings: - _source: - mode: synthetic settings: number_of_shards: 1 number_of_replicas: 0 + index: + mapping.source.mode: synthetic - do: snapshot.create: diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/spatial/140_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/spatial/140_synthetic_source.yml index 700142cec9987..17517640f2aa5 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/spatial/140_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/spatial/140_synthetic_source.yml @@ -8,9 +8,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: shape: type: geo_shape @@ -74,9 +75,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: shape: type: geo_shape @@ -157,9 +159,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: shape: type: shape @@ -223,9 +226,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: shape: type: shape @@ -306,9 +310,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: point: type: geo_point @@ -422,9 +427,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: geo_point: type: geo_point @@ -501,9 +507,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: point: type: point @@ -597,9 +604,10 @@ indices.create: index: test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: point: type: point diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/transform/preview_transforms_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/transform/preview_transforms_synthetic_source.yml index 08055946a7831..ee5ec824fd212 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/transform/preview_transforms_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/transform/preview_transforms_synthetic_source.yml @@ -6,9 +6,10 @@ simple: indices.create: index: airline-data body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: time: type: date diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/wildcard/30_ignore_above_synthetic_source.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/wildcard/30_ignore_above_synthetic_source.yml index 2e3ba773fb0f2..d844bf9de9129 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/wildcard/30_ignore_above_synthetic_source.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/wildcard/30_ignore_above_synthetic_source.yml @@ -10,10 +10,9 @@ wildcard field type ignore_above: settings: index: mapping: + source.mode: synthetic ignore_above: 10 mappings: - _source: - mode: synthetic properties: a_wildcard: type: wildcard diff --git a/x-pack/plugin/wildcard/src/yamlRestTest/resources/rest-api-spec/test/30_synthetic_source.yml b/x-pack/plugin/wildcard/src/yamlRestTest/resources/rest-api-spec/test/30_synthetic_source.yml index ffa76f7433985..20472669d4d77 100644 --- a/x-pack/plugin/wildcard/src/yamlRestTest/resources/rest-api-spec/test/30_synthetic_source.yml +++ b/x-pack/plugin/wildcard/src/yamlRestTest/resources/rest-api-spec/test/30_synthetic_source.yml @@ -7,9 +7,10 @@ synthetic source: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword @@ -48,9 +49,10 @@ synthetic source with copy_to: indices.create: index: synthetic_source_test body: + settings: + index: + mapping.source.mode: synthetic mappings: - _source: - mode: synthetic properties: name: type: keyword