diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml index 09896371574ad..3fa6c87869234 100644 --- a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml +++ b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/20_empty_bucket.yml @@ -2,7 +2,6 @@ "Empty Bucket Aggregation": - do: indices.create: - include_type_name: false index: empty_bucket_idx body: settings: diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml index 630211feb08e0..77e8bf6359f22 100644 --- a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml +++ b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/30_single_value_field.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml index bc9634d412694..467efce78a467 100644 --- a/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml +++ b/modules/aggs-matrix-stats/src/test/resources/rest-api-spec/test/stats/40_multi_value_field.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml index 3ceb26b2bac21..ec00b6d41f1c5 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/indices.analyze/10_analyze.yml @@ -23,7 +23,6 @@ - do: indices.create: - include_type_name: false index: test_deprecated_htmlstrip body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml index 7509d9667ef1b..22804be6ab124 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/indices/validate_query/10_synonyms.yml @@ -2,7 +2,6 @@ "validate query with synonyms": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml index 78e2507e462b8..6609eb831b226 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml @@ -5,7 +5,6 @@ # versions in the same position. - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml index f480045689056..495932016966d 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/20_ngram_search.yml @@ -1,7 +1,6 @@ "ngram search": - do: indices.create: - include_type_name: false index: test body: settings: @@ -44,7 +43,6 @@ "testNGramCopyField": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml index 943f1d6ae5767..674a6ab438069 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/30_ngram_highligthing.yml @@ -1,7 +1,6 @@ "ngram highlighting": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml index efe5d04012d57..4ba16007664f1 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/40_query_string.yml @@ -2,7 +2,6 @@ "Test query string with snowball": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml index 5a4af7c9a344a..784ffd9dd123a 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/50_queries_with_synonyms.yml @@ -2,7 +2,6 @@ "Test common terms query with stacked tokens": - do: indices.create: - include_type_name: false index: test body: settings: @@ -220,7 +219,6 @@ "Test match query with synonyms - see #3881 for extensive description of the issue": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml index e24dc918d449a..7de297bb4e215 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/60_synonym_graph.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml index 403d7dd2830fb..35d5b1aaf190f 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/20_phrase.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml index eb0bfc84a9223..8b67abb193aa0 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.suggest/30_synonyms.yml @@ -2,7 +2,6 @@ "suggestions with synonyms": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml index 0e9c5588371a8..cba4370943206 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml @@ -3,7 +3,6 @@ # because there are no token filters that support payloads in core. - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml b/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml index 78368b8703a6d..95c826eee30de 100644 --- a/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml +++ b/modules/ingest-geoip/src/test/resources/rest-api-spec/test/ingest_geoip/20_geoip_processor.yml @@ -127,14 +127,12 @@ body: > { "mappings" : { - "test" : { "properties" : { "geoip.location" : { "type": "geo_point" } } } - } } - match: { acknowledged: true } diff --git a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml index 197daf5357be0..fd8a2ebf1183b 100644 --- a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml +++ b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test123 body: mappings: diff --git a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml b/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml index 9c12aeaa530ea..0f97afbe5ab66 100644 --- a/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml +++ b/modules/lang-mustache/src/test/resources/rest-api-spec/test/lang_mustache/60_typed_keys.yml @@ -1,7 +1,6 @@ setup: - do: indices.put_template: - include_type_name: false name: index_template body: index_patterns: test-* diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml index 470ace98dd329..79836021c7ef7 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/20_scriptfield.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml index b112408396e53..fa55b47b803dd 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/50_script_doc_values.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml index f8ad782665e98..3a549e6c79bf9 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/60_script_doc_values_binary.yml @@ -4,7 +4,6 @@ features: ["headers"] - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml index d06cf45dadd3c..5a994425c5dc2 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_execute_painless_scripts.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: my-index body: mappings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml index 16432f9e70e7a..c2fb38611a30d 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/70_mov_fn_agg.yml @@ -6,7 +6,6 @@ setup: reason: "moving_fn added in 6.4.0" - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml index 24dd8b87d8b8f..c9b73bca029b1 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/80_script_score.yml @@ -80,7 +80,6 @@ setup: "Random functions": - do: indices.create: - include_type_name: false index: test body: settings: @@ -136,7 +135,6 @@ setup: "Decay geo functions": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml index 270f5682aacb4..0a6cf993e2a2e 100644 --- a/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml +++ b/modules/lang-painless/src/test/resources/rest-api-spec/test/painless/90_interval_query_filter.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_indexing.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_indexing.yml index fd554fb16dbbd..846341cd8ece4 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_indexing.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/dense-vector/10_indexing.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test-index body: settings: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml index 28cd9a4abc045..8a874d30591f6 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_feature/10_basic.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml index 1c1f021d0fd8e..f524bd93bb600 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/rank_features/10_basic.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml index 9badd5ca3018d..0298a1c00ce90 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/scaled_float/10_basic.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_indexing.yml b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_indexing.yml index ef78a48fab5a1..b3efff318b5e3 100644 --- a/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_indexing.yml +++ b/modules/mapper-extras/src/test/resources/rest-api-spec/test/sparse-vector/10_indexing.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test-index body: settings: diff --git a/modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml b/modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml index 7d3fb36bafc93..d85f89e768db8 100644 --- a/modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml +++ b/modules/parent-join/src/test/resources/rest-api-spec/test/11_parent_child.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml b/modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml index 27af9794843d9..379fdddea0b02 100644 --- a/modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml +++ b/modules/parent-join/src/test/resources/rest-api-spec/test/20_parent_join.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml b/modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml index 8c39ed8278a69..3ed2ed64d782c 100644 --- a/modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml +++ b/modules/percolator/src/test/resources/rest-api-spec/test/10_basic.yml @@ -2,7 +2,6 @@ "Test percolator basics via rest": - do: indices.create: - include_type_name: false index: queries_index body: mappings: diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml b/modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml index f726b1f00bddf..d45b14a1edc5f 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/reindex/20_validation.yml @@ -166,9 +166,8 @@ index: test body: mappings: - test: - _source: - enabled: false + _source: + enabled: false - do: index: index: test @@ -178,7 +177,7 @@ indices.refresh: {} - do: - catch: /\[test\]\[test\]\[1\] didn't store _source/ + catch: /\[test\]\[_doc\]\[1\] didn't store _source/ reindex: body: source: diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml b/modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml index ae571d97c105a..b36593b4b962c 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/reindex/95_parent_join.yml @@ -4,18 +4,16 @@ setup: index: source body: mappings: - doc: - properties: - join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } } + properties: + join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } } - do: indices.create: index: dest body: mappings: - doc: - properties: - join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } } + properties: + join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } } - do: index: diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml index aba57218b8a3b..ba14b34cf0ef5 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yml @@ -5,10 +5,9 @@ index: test body: mappings: - place: - properties: - name: - type: keyword + properties: + name: + type: keyword - do: index: index: test @@ -18,7 +17,6 @@ - do: indices.put_mapping: - include_type_name: false index: test body: properties: diff --git a/plugins/analysis-icu/src/test/resources/rest-api-spec/test/analysis_icu/20_search.yml b/plugins/analysis-icu/src/test/resources/rest-api-spec/test/analysis_icu/20_search.yml index aaa3ea7fb042b..90aae30bbb5b5 100644 --- a/plugins/analysis-icu/src/test/resources/rest-api-spec/test/analysis_icu/20_search.yml +++ b/plugins/analysis-icu/src/test/resources/rest-api-spec/test/analysis_icu/20_search.yml @@ -4,7 +4,6 @@ "Index ICU content": - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/plugins/analysis-kuromoji/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml b/plugins/analysis-kuromoji/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml index 3b7fc4eb46293..9a052469c2019 100644 --- a/plugins/analysis-kuromoji/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml +++ b/plugins/analysis-kuromoji/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml @@ -7,11 +7,10 @@ index: test body: mappings: - type: - properties: - text: - type: text - analyzer: kuromoji + properties: + text: + type: text + analyzer: kuromoji - do: index: diff --git a/plugins/analysis-nori/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml b/plugins/analysis-nori/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml index e31355d299e9a..b7ecd933b6676 100644 --- a/plugins/analysis-nori/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml +++ b/plugins/analysis-nori/src/test/resources/rest-api-spec/test/analysis_nori/20_search.yml @@ -7,11 +7,10 @@ index: test body: mappings: - type: - properties: - text: - type: text - analyzer: nori + properties: + text: + type: text + analyzer: nori - do: index: diff --git a/plugins/analysis-phonetic/src/test/resources/rest-api-spec/test/analysis_phonetic/40_search.yml b/plugins/analysis-phonetic/src/test/resources/rest-api-spec/test/analysis_phonetic/40_search.yml index 80f7b63bb0b7c..2e6ee7ebd102a 100644 --- a/plugins/analysis-phonetic/src/test/resources/rest-api-spec/test/analysis_phonetic/40_search.yml +++ b/plugins/analysis-phonetic/src/test/resources/rest-api-spec/test/analysis_phonetic/40_search.yml @@ -4,7 +4,6 @@ "Index phonetic content": - do: indices.create: - include_type_name: false index: phonetic_sample body: settings: diff --git a/plugins/analysis-smartcn/src/test/resources/rest-api-spec/test/analysis_smartcn/20_search.yml b/plugins/analysis-smartcn/src/test/resources/rest-api-spec/test/analysis_smartcn/20_search.yml index 2529e40c0be5e..0a1f6e2af42bf 100644 --- a/plugins/analysis-smartcn/src/test/resources/rest-api-spec/test/analysis_smartcn/20_search.yml +++ b/plugins/analysis-smartcn/src/test/resources/rest-api-spec/test/analysis_smartcn/20_search.yml @@ -4,7 +4,6 @@ "Index Smartcn content": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/plugins/analysis-stempel/src/test/resources/rest-api-spec/test/analysis_stempel/20_search.yml b/plugins/analysis-stempel/src/test/resources/rest-api-spec/test/analysis_stempel/20_search.yml index dc00c297694db..7276b6744dfb5 100644 --- a/plugins/analysis-stempel/src/test/resources/rest-api-spec/test/analysis_stempel/20_search.yml +++ b/plugins/analysis-stempel/src/test/resources/rest-api-spec/test/analysis_stempel/20_search.yml @@ -4,7 +4,6 @@ "Index Stempel content": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/plugins/analysis-ukrainian/src/test/resources/rest-api-spec/test/analysis_ukrainian/20_search.yml b/plugins/analysis-ukrainian/src/test/resources/rest-api-spec/test/analysis_ukrainian/20_search.yml index aec452ed3fe99..ba860729ebf23 100644 --- a/plugins/analysis-ukrainian/src/test/resources/rest-api-spec/test/analysis_ukrainian/20_search.yml +++ b/plugins/analysis-ukrainian/src/test/resources/rest-api-spec/test/analysis_ukrainian/20_search.yml @@ -4,7 +4,6 @@ "Index Stempel content": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/plugins/mapper-annotated-text/src/test/resources/rest-api-spec/test/mapper_annotatedtext/10_basic.yml b/plugins/mapper-annotated-text/src/test/resources/rest-api-spec/test/mapper_annotatedtext/10_basic.yml index 0049e60def439..a27e6c44a7fa2 100644 --- a/plugins/mapper-annotated-text/src/test/resources/rest-api-spec/test/mapper_annotatedtext/10_basic.yml +++ b/plugins/mapper-annotated-text/src/test/resources/rest-api-spec/test/mapper_annotatedtext/10_basic.yml @@ -9,7 +9,6 @@ - do: indices.create: - include_type_name: false index: annotated body: settings: diff --git a/plugins/mapper-murmur3/src/test/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml b/plugins/mapper-murmur3/src/test/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml index 647fd52f17ef3..34db9d017a854 100644 --- a/plugins/mapper-murmur3/src/test/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml +++ b/plugins/mapper-murmur3/src/test/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml @@ -6,7 +6,6 @@ - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/plugins/mapper-size/src/test/resources/rest-api-spec/test/mapper_size/10_basic.yml b/plugins/mapper-size/src/test/resources/rest-api-spec/test/mapper_size/10_basic.yml index 9a1049f72d0a4..bc33818e10e62 100644 --- a/plugins/mapper-size/src/test/resources/rest-api-spec/test/mapper_size/10_basic.yml +++ b/plugins/mapper-size/src/test/resources/rest-api-spec/test/mapper_size/10_basic.yml @@ -6,7 +6,6 @@ - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml index 4499a60bfe24a..8b11310ff95fd 100644 --- a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml +++ b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml @@ -14,15 +14,15 @@ bulk: refresh: true body: - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "local_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "local_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - do: diff --git a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml index 2144c281e40d0..a0445adacab03 100644 --- a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml +++ b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml @@ -5,25 +5,24 @@ index: field_caps_index_2 body: mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: double - geo: - type: geo_point - object: - type: object - properties: - nested1 : - type : text - index: true - nested2: - type: float - doc_values: true + properties: + text: + type: text + keyword: + type: keyword + number: + type: double + geo: + type: geo_point + object: + type: object + properties: + nested1 : + type : text + index: true + nested2: + type: float + doc_values: true - do: field_caps: diff --git a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/70_skip_shards.yml b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/70_skip_shards.yml index d1a5a273e1d0f..9242664d9f219 100644 --- a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/70_skip_shards.yml +++ b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/70_skip_shards.yml @@ -10,17 +10,16 @@ number_of_shards: 1 number_of_replicas: 0 mappings: - test_type: - properties: - created_at: - type: date - format: "yyyy-MM-dd" + properties: + created_at: + type: date + format: "yyyy-MM-dd" - do: bulk: refresh: true body: - - '{"index": {"_index": "skip_shards_index", "_type": "test_type"}}' + - '{"index": {"_index": "skip_shards_index"}}' - '{"f1": "local_cluster", "sort_field": 0, "created_at" : "2017-01-01"}' # check that we skip the remote shard diff --git a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/80_index_name_agg.yml b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/80_index_name_agg.yml index d2fcd6878f8e6..9c4aa0e7f09c4 100644 --- a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/80_index_name_agg.yml +++ b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/multi_cluster/80_index_name_agg.yml @@ -24,7 +24,7 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "single_doc_index", "_type": "test_type"}}' + - '{"index": {"_index": "single_doc_index"}}' - '{"f1": "local_cluster", "sort_field": 0}' - do: diff --git a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml index 24dc2532937a2..19b3771acf877 100644 --- a/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml +++ b/qa/multi-cluster-search/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml @@ -10,17 +10,16 @@ number_of_shards: 1 number_of_replicas: 0 mappings: - test_type: - properties: - created_at: - type: date - format: "yyyy-MM-dd" + properties: + created_at: + type: date + format: "yyyy-MM-dd" - do: bulk: refresh: true body: - - '{"index": {"_index": "single_doc_index", "_type": "test_type"}}' + - '{"index": {"_index": "single_doc_index"}}' - '{"f1": "remote_cluster", "sort_field": 1, "created_at" : "2016-01-01"}' - do: @@ -30,25 +29,24 @@ settings: index.number_of_shards: 1 mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: double - geo: - type: geo_point - object: - type: object - properties: - nested1 : - type : text - index: false - nested2: - type: float - doc_values: false + properties: + text: + type: text + keyword: + type: keyword + number: + type: double + geo: + type: geo_point + object: + type: object + properties: + nested1 : + type : text + index: false + nested2: + type: float + doc_values: false - do: indices.create: index: field_caps_index_3 @@ -56,25 +54,24 @@ settings: index.number_of_shards: 1 mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: long - geo: - type: keyword - object: - type: object - properties: - nested1 : - type : long - index: false - nested2: - type: keyword - doc_values: false + properties: + text: + type: text + keyword: + type: keyword + number: + type: long + geo: + type: keyword + object: + type: object + properties: + nested1 : + type : long + index: false + nested2: + type: keyword + doc_values: false - do: indices.create: index: test_index @@ -93,17 +90,17 @@ bulk: refresh: true body: - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - do: diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml index 2605836f8573c..bd07ee8a58469 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml @@ -61,7 +61,6 @@ query: percolate: field: query - type: doc document: field2: value field3: value diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yml index 9e06f767d4892..a26a3f8274d99 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/10_basic.yml @@ -25,15 +25,15 @@ bulk: refresh: true body: - - '{"index": {"_index": "test_search_template", "_type": "doc"}}' + - '{"index": {"_index": "test_search_template"}}' - '{"f1": "v1_old"}' - - '{"index": {"_index": "test_search_template", "_type": "doc"}}' + - '{"index": {"_index": "test_search_template"}}' - '{"f1": "v2_old"}' - - '{"index": {"_index": "test_search_template", "_type": "doc"}}' + - '{"index": {"_index": "test_search_template"}}' - '{"f1": "v3_old"}' - - '{"index": {"_index": "test_search_template", "_type": "doc"}}' + - '{"index": {"_index": "test_search_template"}}' - '{"f1": "v4_old"}' - - '{"index": {"_index": "test_search_template", "_type": "doc"}}' + - '{"index": {"_index": "test_search_template"}}' - '{"f1": "v5_old"}' - do: @@ -65,21 +65,19 @@ index: queries body: mappings: - doc: - properties: - query: - type: percolator - field1: - type: keyword - field2: - type: keyword - field3: - type: keyword + properties: + query: + type: percolator + field1: + type: keyword + field2: + type: keyword + field3: + type: keyword - do: index: index: queries - type: doc id: q1 body: query: @@ -89,7 +87,6 @@ - do: index: index: queries - type: doc id: q2 body: query: @@ -103,7 +100,6 @@ - do: index: index: queries - type: doc id: q3 body: query: @@ -176,15 +172,15 @@ bulk: refresh: true body: - - '{"index": {"_index": "reindexed_index", "_type": "doc"}}' + - '{"index": {"_index": "reindexed_index"}}' - '{"f1": "1"}' - - '{"index": {"_index": "reindexed_index", "_type": "doc"}}' + - '{"index": {"_index": "reindexed_index"}}' - '{"f1": "2"}' - - '{"index": {"_index": "reindexed_index", "_type": "doc"}}' + - '{"index": {"_index": "reindexed_index"}}' - '{"f1": "3"}' - - '{"index": {"_index": "reindexed_index", "_type": "doc"}}' + - '{"index": {"_index": "reindexed_index"}}' - '{"f1": "4"}' - - '{"index": {"_index": "reindexed_index", "_type": "doc"}}' + - '{"index": {"_index": "reindexed_index"}}' - '{"f1": "5"}' - do: @@ -215,9 +211,8 @@ index: all-index body: mappings: - type: - _all: - enabled: false - properties: - field: - type: text + _all: + enabled: false + properties: + field: + type: text diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml index 508a898e0cdb5..63e67652127e9 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml @@ -27,7 +27,6 @@ - do: index: index: queries - type: doc id: q4 refresh: true body: @@ -134,6 +133,7 @@ - do: indices.get_mapping: + include_type_name: false index: all-index - is_true: all-index.mappings._all diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/60_pipeline_timestamp_date_mapping.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/60_pipeline_timestamp_date_mapping.yml index ea0984ef3bcbf..0f514f2213492 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/60_pipeline_timestamp_date_mapping.yml +++ b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/60_pipeline_timestamp_date_mapping.yml @@ -9,7 +9,7 @@ index: timetest body: mappings: - test: { "properties": { "my_time": {"type": "date", "format": "strict_date_optional_time_nanos"}}} + "properties": { "my_time": {"type": "date", "format": "strict_date_optional_time_nanos"}} - do: ingest.put_pipeline: @@ -31,7 +31,6 @@ - do: index: index: timetest - type: test id: 1 pipeline: "my_timely_pipeline" body: {} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/70_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/70_mix_typeless_typeful.yml index f9d5c079856a1..cad0891b21e52 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/70_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/70_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.aliases/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.aliases/10_basic.yml index 0c64c94ce7f85..bdcee7af1bcb6 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.aliases/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.aliases/10_basic.yml @@ -54,7 +54,6 @@ - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.fielddata/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.fielddata/10_basic.yml index b1b0e5fac933d..6ef59f30753f7 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.fielddata/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.fielddata/10_basic.yml @@ -22,7 +22,6 @@ - do: indices.create: - include_type_name: false index: index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/count/20_query_string.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/count/20_query_string.yml index 5ef6b7584452a..66b0699a184d2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/count/20_query_string.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/count/20_query_string.yml @@ -2,7 +2,6 @@ "count with query_string parameters": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/70_nested.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/70_nested.yml index 1d6bd5bd70373..e6d2413f16788 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/70_nested.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/create/70_nested.yml @@ -5,7 +5,6 @@ setup: reason: types are required in requests before 7.0.0 - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml index 2c912a2165a83..755aaca448b0b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml @@ -2,6 +2,7 @@ setup: - do: indices.create: + include_type_name: true index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/11_shard_header.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/11_shard_header.yml index e3f210966563e..3fc10bc8db12d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/11_shard_header.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/11_shard_header.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: foobar body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/30_routing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/30_routing.yml index f1647b8edac85..27e9350caed70 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/30_routing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/30_routing.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/50_refresh.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/50_refresh.yml index 22d9a6971f4f9..935e0946f100b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/50_refresh.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/50_refresh.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml index 22df4f5dc437e..e0f20795e41ca 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/30_query_string.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/30_query_string.yml index 6a71cba7c4da1..ac34d4c2495f2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/30_query_string.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/30_query_string.yml @@ -6,7 +6,6 @@ - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml index ea298f2092342..b6930688acf2d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml @@ -2,6 +2,7 @@ "explain with query_string parameters": - do: indices.create: + include_type_name: true index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml index baefba7c312de..36fdbaa6b6f78 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml index 7fe06f1c56152..f7ed51665003d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test1 body: mappings: @@ -36,7 +35,6 @@ setup: - do: indices.create: - include_type_name: false index: test2 body: mappings: @@ -69,7 +67,6 @@ setup: index: false - do: indices.create: - include_type_name: false index: test3 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml index 71907461da3ea..d13229dbffbc6 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/20_stored_fields.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/20_stored_fields.yml index 7dd782652bf99..ab27842e4516e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/20_stored_fields.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/20_stored_fields.yml @@ -6,7 +6,6 @@ reason: types are required in requests before 7.0.0 - do: indices.create: - include_type_name: false index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml index fbffb9e0ea8ce..d1862fc0340d8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml @@ -3,6 +3,7 @@ - do: indices.create: + include_type_name: true index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/40_routing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/40_routing.yml index 61b4fc8a1597a..9ba546d6ef942 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/40_routing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/40_routing.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/60_realtime_refresh.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/60_realtime_refresh.yml index a1647835536e1..ef4fa60bf1b0e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/60_realtime_refresh.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/60_realtime_refresh.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/70_source_filtering.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/70_source_filtering.yml index 4090636f1c21f..f4a5ba39be3b8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/70_source_filtering.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/70_source_filtering.yml @@ -6,7 +6,6 @@ reason: types are required in requests before 7.0.0 - do: indices.create: - include_type_name: false index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml index ca629cfa6aafe..3ac493c629f20 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml @@ -3,6 +3,7 @@ - do: indices.create: + include_type_name: true index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/85_source_missing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/85_source_missing.yml index 79b49097e743a..c214bf87d3997 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/85_source_missing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/85_source_missing.yml @@ -7,7 +7,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml index 63a47c7c95836..d7cfced5164ec 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml @@ -3,6 +3,7 @@ setup: - do: indices.create: + include_type_name: true index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/40_routing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/40_routing.yml index c3b577df4fe2c..630cf39dbe65c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/40_routing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/index/40_routing.yml @@ -6,7 +6,6 @@ reason: types are required in requests before 7.0.0 - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/60_refresh.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/60_refresh.yml index c991d7d2c3014..e16602d7ac8b6 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/60_refresh.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/index/60_refresh.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/70_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/70_mix_typeless_typeful.yml index 9f4f68f1998ae..f3629fbb7cc18 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/70_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/index/70_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: @@ -70,6 +71,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.analyze/10_analyze.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.analyze/10_analyze.yml index 0b1c205e8956c..8062a96f3e6bc 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.analyze/10_analyze.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.analyze/10_analyze.yml @@ -11,7 +11,6 @@ "Index and field": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/10_basic.yml index 19bc94870cb47..78e67541a1f36 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/10_basic.yml @@ -6,7 +6,6 @@ reason: include_type_name defaults to true before 7.0.0 - do: indices.create: - include_type_name: false index: test_index body: mappings: @@ -26,7 +25,6 @@ reason: include_type_name defaults to true before 7.0.0 - do: indices.create: - include_type_name: false index: test_index body: settings: @@ -46,7 +44,6 @@ reason: include_type_name defaults to true before 7.0.0 - do: indices.create: - include_type_name: false index: test_index - match: { acknowledged: true } @@ -60,7 +57,6 @@ reason: include_type_name defaults to true before 7.0.0 - do: indices.create: - include_type_name: false index: test_index wait_for_active_shards: all body: @@ -78,7 +74,6 @@ reason: include_type_name defaults to true before 7.0.0 - do: indices.create: - include_type_name: false index: test_index body: mappings: @@ -112,7 +107,6 @@ reason: is_write_index is not implemented in ES <= 6.x - do: indices.create: - include_type_name: false index: test_index body: aliases: @@ -135,7 +129,6 @@ - do: catch: /illegal_argument_exception/ indices.create: - include_type_name: false index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml index bb9157fe684f8..90fa033b31467 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml @@ -19,7 +19,6 @@ - do: indices.create: - include_type_name: false index: test-1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml index 6f5ae97683b82..b70bc8ebeb469 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/10_basic.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test_index body: aliases: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/11_basic_with_types.yml index 2f3e538743c56..413c4bcb8d28c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get/11_basic_with_types.yml @@ -3,6 +3,7 @@ setup: - do: indices.create: + include_type_name: true index: test_index body: aliases: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/10_basic.yml index e215c43b4bdeb..9be1f7246d5f3 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/10_basic.yml @@ -5,7 +5,6 @@ setup: reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/11_basic_with_types.yml index d45f0671db5a6..0a7f5fa3560ba 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/11_basic_with_types.yml @@ -2,6 +2,7 @@ setup: - do: indices.create: + include_type_name: true index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/20_missing_field.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/20_missing_field.yml index 3bc1c349039c0..1570ded351874 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/20_missing_field.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/20_missing_field.yml @@ -5,7 +5,6 @@ reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/21_missing_field_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/21_missing_field_with_types.yml index c715d27ebc26f..264d187ebd22d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/21_missing_field_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/21_missing_field_with_types.yml @@ -3,6 +3,7 @@ - do: indices.create: + include_type_name: true index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/40_missing_index.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/40_missing_index.yml index 2273867816c6e..7c7b07b587849 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/40_missing_index.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/40_missing_index.yml @@ -4,7 +4,6 @@ - do: catch: missing indices.get_field_mapping: - include_type_name: false index: test_index fields: field diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/50_field_wildcards.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/50_field_wildcards.yml index 435259fb3b07d..7db61d122e7ce 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/50_field_wildcards.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/50_field_wildcards.yml @@ -5,7 +5,6 @@ setup: reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index body: mappings: @@ -25,7 +24,6 @@ setup: - do: indices.create: - include_type_name: false index: test_index_2 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/51_field_wildcards_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/51_field_wildcards_with_types.yml index fe0c135f13ad7..68c183e9b292e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/51_field_wildcards_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/51_field_wildcards_with_types.yml @@ -2,6 +2,7 @@ setup: - do: indices.create: + include_type_name: true index: test_index body: mappings: @@ -22,6 +23,7 @@ setup: - do: indices.create: + include_type_name: true index: test_index_2 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/60_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/60_mix_typeless_typeful.yml index 862075f450e73..2b6433a3e98f8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/60_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/60_mix_typeless_typeful.yml @@ -3,6 +3,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml index 76519cc4c4c01..c3addd95469d4 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/10_basic.yml @@ -18,7 +18,6 @@ setup: - do: indices.create: - include_type_name: false index: t - do: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/11_basic_with_types.yml index 1c26a2a3d3d13..598cc24f7806b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/11_basic_with_types.yml @@ -2,12 +2,14 @@ setup: - do: indices.create: + include_type_name: true index: test_1 body: mappings: doc: {} - do: indices.create: + include_type_name: true index: test_2 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/20_missing_type.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/20_missing_type.yml index 93598cab6cf8b..f17fb6a595305 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/20_missing_type.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/20_missing_type.yml @@ -26,6 +26,7 @@ "No type matching pattern returns 404": - do: indices.create: + include_type_name: true index: test_index body: mappings: @@ -50,6 +51,7 @@ "Existent and non-existent type returns 404 and the existing type": - do: indices.create: + include_type_name: true index: test_index body: mappings: @@ -74,6 +76,7 @@ "Existent and non-existent types returns 404 and the existing type": - do: indices.create: + include_type_name: true index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/30_missing_index.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/30_missing_index.yml index 9b422ec8b9156..5a7624265ecc9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/30_missing_index.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/30_missing_index.yml @@ -3,7 +3,6 @@ - do: catch: missing indices.get_mapping: - include_type_name: false index: test_index --- @@ -20,7 +19,6 @@ reason: ignore_unavailable was ignored in previous versions - do: indices.get_mapping: - include_type_name: false index: test_index ignore_unavailable: true @@ -31,7 +29,6 @@ - do: catch: missing indices.get_mapping: - include_type_name: false index: test_index ignore_unavailable: true allow_no_indices: false diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/40_aliases.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/40_aliases.yml index 26086fe4c3a13..15a52b7b2db25 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/40_aliases.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/40_aliases.yml @@ -3,7 +3,6 @@ - do: indices.create: - include_type_name: false index: test_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml index ea6a3d3a01361..d3f15b3292285 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/50_wildcard_expansion.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test-xxx body: settings: @@ -14,7 +13,6 @@ setup: type: keyword - do: indices.create: - include_type_name: false index: test-xxy body: settings: @@ -26,7 +24,6 @@ setup: type: keyword - do: indices.create: - include_type_name: false index: test-xyy body: settings: @@ -38,7 +35,6 @@ setup: type: keyword - do: indices.create: - include_type_name: false index: test-yyy body: settings: @@ -66,7 +62,6 @@ setup: - do: indices.get_mapping: - include_type_name: false index: test-x* - is_true: test-xxx.mappings @@ -77,7 +72,6 @@ setup: - do: indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: all @@ -90,7 +84,6 @@ setup: - do: indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: open @@ -102,7 +95,6 @@ setup: - do: indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: closed @@ -115,7 +107,6 @@ setup: reason: allow_no_indices (defaults to true) was ignored in previous versions - do: indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: none @@ -128,7 +119,6 @@ setup: - do: catch: missing indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: none allow_no_indices: false @@ -137,7 +127,6 @@ setup: - do: indices.get_mapping: - include_type_name: false index: test-x* expand_wildcards: open,closed diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_mix_typeless_typeful.yml index 89e0d42a9e799..162a8d340d48a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_mapping/70_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: @@ -17,7 +18,6 @@ - do: indices.get_mapping: - include_type_name: false index: index - match: { index.mappings.properties.foo.type: "keyword" } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_template/20_get_missing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_template/20_get_missing.yml index 13d05efc67151..2751f57dacb6c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_template/20_get_missing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_template/20_get_missing.yml @@ -9,6 +9,5 @@ setup: - do: catch: missing indices.get_template: - include_type_name: false name: test diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml index 14cc3615db05a..420b12398d267 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/10_basic.yml @@ -5,7 +5,6 @@ reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index - do: @@ -60,7 +59,6 @@ reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index - do: catch: /illegal_argument_exception/ diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml index 44796defef7c5..182ec017e0d30 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml @@ -4,15 +4,12 @@ setup: reason: include_type_name defaults to true before 7.0 - do: indices.create: - include_type_name: false index: test_index1 - do: indices.create: - include_type_name: false index: test_index2 - do: indices.create: - include_type_name: false index: foo diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shrink/20_source_mapping.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shrink/20_source_mapping.yml index de9c51a890c9a..f12864236d7bd 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shrink/20_source_mapping.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shrink/20_source_mapping.yml @@ -14,7 +14,6 @@ # create index - do: indices.create: - include_type_name: false index: source wait_for_active_shards: 1 body: @@ -38,7 +37,6 @@ # create template matching shrink target - do: indices.put_template: - include_type_name: false name: tpl1 body: index_patterns: targ* diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.sort/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.sort/10_basic.yml index 8cc12d4fe959b..b9089689b0cf1 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.sort/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.sort/10_basic.yml @@ -3,7 +3,6 @@ - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.split/20_source_mapping.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.split/20_source_mapping.yml index 442fe7c896173..3740167a0253a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.split/20_source_mapping.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.split/20_source_mapping.yml @@ -8,7 +8,6 @@ # create index - do: indices.create: - include_type_name: false index: source wait_for_active_shards: 1 body: @@ -31,7 +30,6 @@ # create template matching shrink target - do: indices.put_template: - include_type_name: false name: tpl1 body: index_patterns: targ* diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/13_fields.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/13_fields.yml index 5e7e266394375..42a11e467ccb3 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/13_fields.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/13_fields.yml @@ -3,7 +3,6 @@ setup: - do: indices.create: - include_type_name: false index: test1 wait_for_active_shards: all body: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.validate_query/20_query_string.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.validate_query/20_query_string.yml index 8ce0f8c01cb4d..2f74aee3a973e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.validate_query/20_query_string.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.validate_query/20_query_string.yml @@ -2,7 +2,6 @@ "validate_query with query_string parameters": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/20_stored_fields.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/20_stored_fields.yml index 5fefcee57c76b..45460deb04e0b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/20_stored_fields.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/20_stored_fields.yml @@ -6,7 +6,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml index 33cab111a8b3a..05b9738d46180 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml @@ -3,6 +3,7 @@ - do: indices.create: + include_type_name: true index: test_1 body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mlt/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mlt/10_basic.yml index 2457087ad2de5..243d953811336 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mlt/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mlt/10_basic.yml @@ -2,7 +2,6 @@ "Basic mlt": - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/20_typed_keys.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/20_typed_keys.yml index cab5c5ca628c9..0be04fd01c0ed 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/20_typed_keys.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/20_typed_keys.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test-0 body: settings: @@ -22,7 +21,6 @@ setup: - do: indices.create: - include_type_name: false index: test-1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/10_basic.yml index 0cdf4bf9aef5c..87c3e6065bba4 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/10_basic.yml @@ -4,7 +4,6 @@ setup: reason: types are required in requests before 7.0.0 - do: indices.create: - include_type_name: false index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml index 27fa94e85a437..0c037eee9ddd2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml @@ -1,6 +1,7 @@ setup: - do: indices.create: + include_type_name: true index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/20_deprecated.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/20_deprecated.yml index 633857815c9c0..376192680c99b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/20_deprecated.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/20_deprecated.yml @@ -13,7 +13,6 @@ setup: - do: indices.create: - include_type_name: false index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml index 3ee06780a1f65..b0335498e22a1 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml @@ -9,6 +9,7 @@ - do: indices.create: + include_type_name: true index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/30_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/30_mix_typeless_typeful.yml index 24bb8a7d34f5f..b14b5f94ebbc2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/30_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/30_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/range/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/range/10_basic.yml index a63ad16096472..44c60cfe70b52 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/range/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/range/10_basic.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/100_avg_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/100_avg_metric.yml index 559421a8ad13a..0e57bb9abd667 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/100_avg_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/100_avg_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/10_histogram.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/10_histogram.yml index 784b95cec25cf..f07ac96e67e98 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/10_histogram.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/10_histogram.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/110_max_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/110_max_metric.yml index c02dc27d3376c..4235679746115 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/110_max_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/110_max_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/120_min_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/120_min_metric.yml index a02ba6840fdee..eb68357258507 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/120_min_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/120_min_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/130_sum_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/130_sum_metric.yml index 486e7f19873e7..3221543276115 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/130_sum_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/130_sum_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/140_value_count_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/140_value_count_metric.yml index d483b5e1a494f..b5ac7d2e5db01 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/140_value_count_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/140_value_count_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/150_stats_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/150_stats_metric.yml index 112e379c3c937..2afad21e61421 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/150_stats_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/150_stats_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/160_extended_stats_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/160_extended_stats_metric.yml index cfb6102b5f606..c70ca3356767a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/160_extended_stats_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/160_extended_stats_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/170_cardinality_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/170_cardinality_metric.yml index 0ea6ef5604a31..482ab05291a4d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/170_cardinality_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/170_cardinality_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml index 35f07a65390a5..faae9c1ccda82 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml index 6e85e34538fde..809e18458f0bd 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/190_percentiles_hdr_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/200_top_hits_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/200_top_hits_metric.yml index b77362963684c..11e3d5906d7e9 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/200_top_hits_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/200_top_hits_metric.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: my-index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/20_terms.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/20_terms.yml index d442672bf8bed..e8d725f7539b2 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/20_terms.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/20_terms.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: @@ -25,7 +24,6 @@ setup: - do: indices.create: - include_type_name: false index: test_2 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/220_filters_bucket.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/220_filters_bucket.yml index 74e077d4c6a51..a6b7cae104418 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/220_filters_bucket.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/220_filters_bucket.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml index 5e1b336e7ccf8..8532b40fbc1e1 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/230_composite.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/240_max_buckets.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/240_max_buckets.yml index 5ed025a72095f..3dd8d345043c3 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/240_max_buckets.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/240_max_buckets.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/260_weighted_avg.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/260_weighted_avg.yml index 65f5e29f7e8e7..c5988fc9e5dc4 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/260_weighted_avg.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/260_weighted_avg.yml @@ -4,7 +4,6 @@ setup: reason: weighted_avg is only available as of 6.4.0 - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/270_median_absolute_deviation_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/270_median_absolute_deviation_metric.yml index 3a96000f3a5a8..0cba08fccae9b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/270_median_absolute_deviation_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/270_median_absolute_deviation_metric.yml @@ -4,7 +4,6 @@ setup: reason: "added in 6.6.0" - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/30_sig_terms.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/30_sig_terms.yml index 3376ce4441457..99d0f29a9b2ad 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/30_sig_terms.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/30_sig_terms.yml @@ -2,7 +2,6 @@ "Default index": - do: indices.create: - include_type_name: false index: goodbad body: settings: @@ -77,7 +76,6 @@ "IP test": - do: indices.create: - include_type_name: false index: ip_index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/40_range.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/40_range.yml index d4492861e72e8..b1f093c138048 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/40_range.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/40_range.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/50_filter.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/50_filter.yml index 6964acdab06d9..c32cae9ff8239 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/50_filter.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/50_filter.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/70_adjacency_matrix.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/70_adjacency_matrix.yml index ad364e930df89..3394b9a5a602a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/70_adjacency_matrix.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/70_adjacency_matrix.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/80_typed_keys.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/80_typed_keys.yml index 5afd8b925e652..7897d1feb5aa6 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/80_typed_keys.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/80_typed_keys.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/90_sig_text.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/90_sig_text.yml index f730a099989fe..673d19e04cf22 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/90_sig_text.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/90_sig_text.yml @@ -3,7 +3,6 @@ - do: indices.create: - include_type_name: false index: goodbad body: settings: @@ -79,7 +78,6 @@ - do: indices.create: - include_type_name: false index: goodbad body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/10_unified.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/10_unified.yml index 03989a2da185a..edb1ba1b05934 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/10_unified.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/10_unified.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/20_fvh.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/20_fvh.yml index fd1bdbc86efa4..d411f55106d75 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/20_fvh.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/20_fvh.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/30_max_analyzed_offset.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/30_max_analyzed_offset.yml index f90d18c6d3996..334708b54b066 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/30_max_analyzed_offset.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.highlight/30_max_analyzed_offset.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml index a2b6a480d48e7..629a6d4de34a1 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/10_source_filtering.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/10_source_filtering.yml index 992d6325a1381..501fb1292da94 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/10_source_filtering.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/10_source_filtering.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml index c0e998c711895..99a7300abf1dd 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/110_field_collapsing.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/115_multiple_field_collapsing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/115_multiple_field_collapsing.yml index ca55785066719..b10401f48dbce 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/115_multiple_field_collapsing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/115_multiple_field_collapsing.yml @@ -5,7 +5,6 @@ reason: using multiple field collapsing from 7.0 on - do: indices.create: - include_type_name: false index: addresses body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/120_batch_reduce_size.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/120_batch_reduce_size.yml index 5cc22387c5118..9c23899fc12dc 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/120_batch_reduce_size.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/120_batch_reduce_size.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/140_pre_filter_search_shards.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/140_pre_filter_search_shards.yml index e0999db549127..e9fb959406e0e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/140_pre_filter_search_shards.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/140_pre_filter_search_shards.yml @@ -1,7 +1,6 @@ setup: - do: indices.create: - include_type_name: false index: index_1 body: settings: @@ -13,7 +12,6 @@ setup: format: "yyyy-MM-dd" - do: indices.create: - include_type_name: false index: index_2 body: settings: @@ -25,7 +23,6 @@ setup: format: "yyyy-MM-dd" - do: indices.create: - include_type_name: false index: index_3 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/150_rewrite_on_coordinator.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/150_rewrite_on_coordinator.yml index 626d4a8088986..7724fdc8c0673 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/150_rewrite_on_coordinator.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/150_rewrite_on_coordinator.yml @@ -1,7 +1,6 @@ "Ensure that we fetch the document only once": - do: indices.create: - include_type_name: false index: search_index body: settings: @@ -36,7 +35,7 @@ search: rest_total_hits_as_int: true index: "search_index" - body: { "size" : 0, "query" : { "terms" : { "user" : { "index": "lookup_index", "type": "doc", "id": "1", "path": "followers"} } } } + body: { "size" : 0, "query" : { "terms" : { "user" : { "index": "lookup_index", "type": "_doc", "id": "1", "path": "followers"} } } } - do: indices.create: index: lookup_index @@ -44,14 +43,12 @@ settings: number_of_shards: 1 mappings: - doc: - properties: - followers: - type: keyword + properties: + followers: + type: keyword - do: index: index: lookup_index - type: doc id: 1 body: { "followers" : ["1", "3"] } - do: @@ -61,7 +58,7 @@ search: rest_total_hits_as_int: true index: "search_index" - body: { "size" : 0, "query" : { "terms" : { "user" : { "index": "lookup_index", "type": "doc", "id": "1", "path": "followers"} } } } + body: { "size" : 0, "query" : { "terms" : { "user" : { "index": "lookup_index", "type": "_doc", "id": "1", "path": "followers"} } } } - match: { _shards.total: 5 } - match: { _shards.successful: 5 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/160_exists_query.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/160_exists_query.yml index 89cc7f2135232..d94e86bb6c565 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/160_exists_query.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/160_exists_query.yml @@ -4,7 +4,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: @@ -140,7 +139,6 @@ setup: - do: indices.create: - include_type_name: false index: test-no-dv body: mappings: @@ -292,7 +290,6 @@ setup: - do: indices.create: - include_type_name: false index: test-unmapped body: mappings: @@ -310,7 +307,6 @@ setup: - do: indices.create: - include_type_name: false index: test-empty body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/170_terms_query.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/170_terms_query.yml index 73aea9c581454..89ea24618c68f 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/170_terms_query.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/170_terms_query.yml @@ -5,7 +5,6 @@ reason: index.max_terms_count setting has been added in 7.0.0 - do: indices.create: - include_type_name: false index: test_index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/171_terms_query_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/171_terms_query_with_types.yml index 515dcfe463069..af9e276558a09 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/171_terms_query_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/171_terms_query_with_types.yml @@ -5,6 +5,7 @@ reason: index.max_terms_count setting has been added in 7.0.0 - do: indices.create: + include_type_name: true index: test_index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml index 2e0dd9339c234..e9ba863675dfa 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml @@ -5,7 +5,6 @@ reason: JDK9 only supports this with a special sysproperty added in 6.2.0 - do: indices.create: - include_type_name: false index: test_index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/190_index_prefix_search.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/190_index_prefix_search.yml index 296db2a01dc9a..40c80b88cfb1b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/190_index_prefix_search.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/190_index_prefix_search.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_ignore_malformed.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_ignore_malformed.yml index 70bc254f7b42c..71ddb32302396 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_ignore_malformed.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_ignore_malformed.yml @@ -6,7 +6,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_index_phrase_search.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_index_phrase_search.yml index 02f4b55fd3a1c..b48857be4e7a1 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_index_phrase_search.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/200_index_phrase_search.yml @@ -5,7 +5,6 @@ reason: index_phrase is only available as of 7.0.0 - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml index bd7c2ded35c15..e6e54cbb275e8 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/230_interval_query.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/60_query_string.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/60_query_string.yml index 7582ac0df0334..131c8f92a231e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/60_query_string.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/60_query_string.yml @@ -2,7 +2,6 @@ "search with query_string parameters": - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/10_basic.yml index e1e697b496ed1..03f218b140b8f 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/10_basic.yml @@ -15,7 +15,6 @@ "Search shards aliases with and without filters": - do: indices.create: - include_type_name: false index: test_index body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/20_completion.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/20_completion.yml index 0afafdfe0b075..b64a51141dc6e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/20_completion.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/20_completion.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/30_context.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/30_context.yml index 1f16d5e35d6af..e2c7ccfb421e3 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/30_context.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/30_context.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: mappings: @@ -189,9 +188,7 @@ setup: indices.refresh: {} - do: - indices.get_mapping: - include_type_name: false - + indices.get_mapping: {} - do: search: rest_total_hits_as_int: true @@ -240,8 +237,7 @@ setup: indices.refresh: {} - do: - indices.get_mapping: - include_type_name: false + indices.get_mapping: {} - do: search: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/40_typed_keys.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/40_typed_keys.yml index bf11481d0b900..daac7d895611c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/40_typed_keys.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/40_typed_keys.yml @@ -2,7 +2,6 @@ setup: - do: indices.create: - include_type_name: false index: test body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/50_completion_with_multi_fields.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/50_completion_with_multi_fields.yml index fa453b9d84db2..a29019183e199 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/50_completion_with_multi_fields.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/suggest/50_completion_with_multi_fields.yml @@ -8,7 +8,6 @@ - do: indices.create: - include_type_name: false index: completion_with_sub_keyword body: mappings: @@ -74,13 +73,12 @@ index: completion_with_sub_completion body: mappings: - test: - "properties": - "suggest_1": - "type": "completion" - "fields": - "suggest_2": - "type": "completion" + "properties": + "suggest_1": + "type": "completion" + "fields": + "suggest_2": + "type": "completion" - do: index: @@ -122,7 +120,6 @@ - do: indices.create: - include_type_name: false index: completion_with_context body: mappings: @@ -192,7 +189,6 @@ - do: indices.create: - include_type_name: false index: completion_with_weight body: mappings: @@ -249,7 +245,6 @@ - do: indices.create: - include_type_name: false index: geofield_with_completion body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/10_basic.yml index 0a4286ad3e1be..62ec86118e5bb 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/10_basic.yml @@ -5,7 +5,6 @@ setup: - do: indices.create: - include_type_name: false index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml index 2fbcb815d87e5..992d6db7ca786 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml @@ -1,6 +1,7 @@ setup: - do: indices.create: + include_type_name: true index: testidx body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/20_issue7121.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/20_issue7121.yml index 94b6413af772f..5f43e8a247923 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/20_issue7121.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/20_issue7121.yml @@ -7,7 +7,6 @@ setup: "Term vector API should return 'found: false' for docs between index and refresh": - do: indices.create: - include_type_name: false index: testidx body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml index 168c913b75cb3..cf597bf141f61 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml @@ -1,6 +1,7 @@ "Term vector API should return 'found: false' for docs between index and refresh": - do: indices.create: + include_type_name: true index: testidx body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml index 403f2b5b8cf67..4382442dee4dd 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/11_shard_header.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/11_shard_header.yml index 4afe78ca7d30a..41dba3551e64c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/11_shard_header.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/11_shard_header.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: foobar body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/40_routing.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/40_routing.yml index 374390f4b9716..6f43d381e0537 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/40_routing.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/40_routing.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/60_refresh.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/60_refresh.yml index 9e7dfdf4698f2..3a74f75f4f11d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/60_refresh.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/60_refresh.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 body: settings: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/85_fields_meta.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/85_fields_meta.yml index 14b096211c5c2..fe76ab5299cda 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/85_fields_meta.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/85_fields_meta.yml @@ -7,7 +7,6 @@ - do: indices.create: - include_type_name: false index: test_1 - do: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml index 4caeb712c2896..0ca25e8598c24 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml @@ -7,6 +7,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: @@ -47,6 +48,7 @@ - do: indices.create: # not using include_type_name: false on purpose + include_type_name: true index: index body: mappings: diff --git a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java index 813491f2655b7..dbda656656f01 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java +++ b/test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContext.java @@ -98,25 +98,53 @@ public ClientYamlTestResponse callApi(String apiName, Map params } } - // Although include_type_name defaults to false, there is a large number of typed index creations - // in REST tests that need to be manually converted to typeless calls. As a temporary measure, we - // specify include_type_name=true in indices.create calls, unless the parameter has been set otherwise. - // This workaround will be removed once we convert all index creations to be typeless. + if (esVersion().before(Version.V_7_0_0)) { + adaptRequestForOlderVersion(apiName, bodies, requestParams); + } + + HttpEntity entity = createEntity(bodies, requestHeaders); + try { + response = callApiInternal(apiName, requestParams, entity, requestHeaders, nodeSelector); + return response; + } catch(ClientYamlTestResponseException e) { + response = e.getRestTestResponse(); + throw e; + } finally { + // if we hit a bad exception the response is null + Object responseBody = response != null ? response.getBody() : null; + //we always stash the last response body + stash.stashValue("body", responseBody); + } + } + + /** + * To allow tests to run against a mixed 7.x/6.x cluster, we make certain modifications to the + * request related to types. + * + * Specifically, we generally use typeless index creation and document writes in test set-up code. + * This functionality is supported in 7.x, but is not supported in 6.x (or is not the default + * behavior). Here we modify the request so that it will work against a 6.x node. + */ + private void adaptRequestForOlderVersion(String apiName, + List> bodies, + Map requestParams) { + // For index creations, we specify 'include_type_name=false' if it is not explicitly set. This + // allows us to omit the parameter in the test description, while still being able to communicate + // with 6.x nodes where include_type_name defaults to 'true'. if (apiName.equals("indices.create") && requestParams.containsKey(INCLUDE_TYPE_NAME_PARAMETER) == false) { - requestParams.put(INCLUDE_TYPE_NAME_PARAMETER, "true"); + requestParams.put(INCLUDE_TYPE_NAME_PARAMETER, "false"); } - // When running tests against a mixed 7.x/6.x cluster we need to add the type to the document API - // requests if its not already included. + // We add the type to the document API requests if it's not already included. if ((apiName.equals("index") || apiName.equals("update") || apiName.equals("delete") || apiName.equals("get")) - && esVersion().before(Version.V_7_0_0) && requestParams.containsKey("type") == false) { + && requestParams.containsKey("type") == false) { requestParams.put("type", "_doc"); } - // When running tests against a mixed 7.x/6.x cluster we need to add the type to the bulk API requests - // if its not already included. The type can either be on the request parameters or in the action metadata - // in the body of the request so we need to be sensitive to both scenarios - if (apiName.equals("bulk") && esVersion().before(Version.V_7_0_0) && requestParams.containsKey("type") == false) { + // We also add the type to the bulk API requests if it's not already included. The type can either + // be on the request parameters or in the action metadata in the body of the request so we need to + // be sensitive to both scenarios. + if (apiName.equals("bulk") && requestParams.containsKey("type") == false) { if (requestParams.containsKey("index")) { requestParams.put("type", "_doc"); } else { @@ -145,20 +173,6 @@ && esVersion().before(Version.V_7_0_0) && requestParams.containsKey("type") == f } } } - - HttpEntity entity = createEntity(bodies, requestHeaders); - try { - response = callApiInternal(apiName, requestParams, entity, requestHeaders, nodeSelector); - return response; - } catch(ClientYamlTestResponseException e) { - response = e.getRestTestResponse(); - throw e; - } finally { - // if we hit a bad exception the response is null - Object responseBody = response != null ? response.getBody() : null; - //we always stash the last response body - stash.stashValue("body", responseBody); - } } private HttpEntity createEntity(List> bodies, Map headers) throws IOException { diff --git a/test/framework/src/test/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContextTests.java b/test/framework/src/test/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContextTests.java index fbf7f10e5e186..8182e2d0fc7ac 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContextTests.java +++ b/test/framework/src/test/java/org/elasticsearch/test/rest/yaml/ClientYamlTestExecutionContextTests.java @@ -20,8 +20,10 @@ package org.elasticsearch.test.rest.yaml; import org.apache.http.HttpEntity; +import org.elasticsearch.Version; import org.elasticsearch.client.NodeSelector; import org.elasticsearch.test.ESTestCase; +import org.elasticsearch.test.VersionUtils; import java.io.IOException; import java.util.Collections; @@ -33,6 +35,7 @@ public class ClientYamlTestExecutionContextTests extends ESTestCase { public void testHeadersSupportStashedValueReplacement() throws IOException { final AtomicReference> headersRef = new AtomicReference<>(); + final Version version = VersionUtils.randomVersion(random()); final ClientYamlTestExecutionContext context = new ClientYamlTestExecutionContext(null, randomBoolean()) { @Override @@ -41,6 +44,11 @@ ClientYamlTestResponse callApiInternal(String apiName, Map param headersRef.set(headers); return null; } + + @Override + public Version esVersion() { + return version; + } }; final Map headers = new HashMap<>(); headers.put("foo", "$bar"); diff --git a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml index d5cd8ebd4f1ab..42b92a7011a83 100644 --- a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml +++ b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_and_unfollow.yml @@ -28,10 +28,9 @@ soft_deletes: enabled: true mappings: - doc: - properties: - field: - type: keyword + properties: + field: + type: keyword - is_true: acknowledged - do: diff --git a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_stats.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_stats.yml index 220463a60b258..8be035961e979 100644 --- a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_stats.yml +++ b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/follow_stats.yml @@ -28,10 +28,9 @@ soft_deletes: enabled: true mappings: - doc: - properties: - field: - type: keyword + properties: + field: + type: keyword - do: ccr.follow: diff --git a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/index_directly_into_follower_index.yml b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/index_directly_into_follower_index.yml index 62878437c37e3..9d021df585ffe 100644 --- a/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/index_directly_into_follower_index.yml +++ b/x-pack/plugin/ccr/qa/rest/src/test/resources/rest-api-spec/test/ccr/index_directly_into_follower_index.yml @@ -28,10 +28,9 @@ soft_deletes: enabled: true mappings: - doc: - properties: - field: - type: keyword + properties: + field: + type: keyword - is_true: acknowledged - do: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/authenticate/10_field_level_security.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/authenticate/10_field_level_security.yml index 4dadd1370da8c..96063bdc45895 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/authenticate/10_field_level_security.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/authenticate/10_field_level_security.yml @@ -85,12 +85,11 @@ teardown: aliases: the_alias : {} mappings: - doc: - properties: - location: - properties: - city: - type: "keyword" + properties: + location: + properties: + city: + type: "keyword" settings: index: number_of_shards: 1 @@ -100,9 +99,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "test_index", "_type": "doc"}}' + - '{"index": {"_index": "test_index"}}' - '{"marker": "test_1", "location.city": "bos"}' - - '{"index": {"_index": "test_index", "_type": "doc"}}' + - '{"index": {"_index": "test_index"}}' - '{"marker": "test_2", "location.city": "ams"}' - do: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml index 5ac76101f2693..ccd861e6358e0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/graph/10_basic.yml @@ -9,10 +9,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - test: - properties: - keys: - type : integer + properties: + keys: + type : integer --- "Test basic graph explore": @@ -22,14 +21,12 @@ setup: - do: index: index: test_1 - type: test id: 1 body: { keys: [1,2,3] } - do: index: index: test_1 - type: test id: 2 body: { keys: [4,5,6] } @@ -44,7 +41,6 @@ setup: - do: xpack.graph.explore: index: test_1 - type: test body: {"query": {"match": {"keys": 1}},"controls":{"use_significance":false},"vertices":[{"field": "keys","min_doc_count": 1}]} - length: {failures: 0} - length: {vertices: 3} diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yml index 70626a0afd752..f9178dc6f71f5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/get_datafeed_stats.yml @@ -11,10 +11,9 @@ setup: index: number_of_replicas: 1 mappings: - type-1: - properties: - time: - type: date + properties: + time: + type: date - do: headers: @@ -26,10 +25,9 @@ setup: index: number_of_replicas: 1 mappings: - type-2: - properties: - time: - type: date + properties: + time: + type: date - do: headers: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/ml_anomalies_default_mappings.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/ml_anomalies_default_mappings.yml index 91ba0ae17ce0d..c07bdf2add3c0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/ml_anomalies_default_mappings.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/ml_anomalies_default_mappings.yml @@ -42,7 +42,6 @@ setup: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser indices.get_field_mapping: - include_type_name: false index: .ml-anomalies-shared fields: new_field - match: {\.ml-anomalies-shared.mappings.new_field.mapping.new_field.type: keyword} @@ -75,7 +74,6 @@ setup: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser indices.get_mapping: - include_type_name: false index: .ml-anomalies-shared - is_true: \.ml-anomalies-shared.mappings._meta.version @@ -104,6 +102,5 @@ setup: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser indices.get_mapping: - include_type_name: false index: .ml-anomalies-shared - is_true: \.ml-anomalies-shared.mappings._meta.version diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/preview_datafeed.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/preview_datafeed.yml index 23cdb3b55c664..0818bfe4d25fe 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/preview_datafeed.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/preview_datafeed.yml @@ -4,21 +4,19 @@ setup: index: airline-data body: mappings: - response: - properties: - time: - type: date - airline: - type: keyword - responsetime: - type: float - event_rate: - type: integer + properties: + time: + type: date + airline: + type: keyword + responsetime: + type: float + event_rate: + type: integer - do: index: index: airline-data - type: response id: 1 body: > { @@ -31,7 +29,6 @@ setup: - do: index: index: airline-data - type: response id: 2 body: > { @@ -44,7 +41,6 @@ setup: - do: index: index: airline-data - type: response id: 3 body: > { @@ -57,7 +53,6 @@ setup: - do: index: index: airline-data - type: response id: 4 body: > { diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/set_upgrade_mode.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/set_upgrade_mode.yml index 95ce67299c76a..be1e0203a92c7 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/set_upgrade_mode.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/set_upgrade_mode.yml @@ -7,16 +7,15 @@ setup: index: airline-data body: mappings: - response: - properties: - time: - type: date - airline: - type: keyword - airport: - type: text - responsetime: - type: float + properties: + time: + type: date + airline: + type: keyword + airport: + type: text + responsetime: + type: float - do: headers: Authorization: "Basic eF9wYWNrX3Jlc3RfdXNlcjp4LXBhY2stdGVzdC1wYXNzd29yZA==" # run as x_pack_rest_user, i.e. the test setup superuser diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yml index 1dd201007f96f..8722bab94e216 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ml/start_stop_datafeed.yml @@ -6,16 +6,15 @@ setup: index: airline-data body: mappings: - response: - properties: - time: - type: date - airline: - type: keyword - airport: - type: text - responsetime: - type: float + properties: + time: + type: date + airline: + type: keyword + airport: + type: text + responsetime: + type: float - do: headers: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml index f39cfc6ca13a5..0b5a8a2e11180 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_caps.yml @@ -4,7 +4,6 @@ setup: - do: indices.create: index: foo - include_type_name: false body: mappings: properties: @@ -16,7 +15,6 @@ setup: - do: indices.create: index: foo2 - include_type_name: false body: mappings: properties: @@ -28,7 +26,6 @@ setup: - do: indices.create: index: foo3 - include_type_name: false body: mappings: properties: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml index 38b7303ecb3ae..b300af5e0a014 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/rollup/get_rollup_index_caps.yml @@ -4,7 +4,6 @@ setup: - do: indices.create: index: foo - include_type_name: false body: mappings: properties: @@ -16,7 +15,6 @@ setup: - do: indices.create: index: foo2 - include_type_name: false body: mappings: properties: @@ -28,7 +26,6 @@ setup: - do: indices.create: index: foo3 - include_type_name: false body: mappings: properties: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/10_index_doc.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/10_index_doc.yml index 2317d29ee703b..5732b19f93665 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/10_index_doc.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/10_index_doc.yml @@ -39,10 +39,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -53,10 +52,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: index: only_delete @@ -66,10 +64,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -80,10 +77,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" --- teardown: - do: @@ -104,7 +100,6 @@ teardown: create: id: 1 index: only_index - type: doc body: > { "name" : "doc1" @@ -115,7 +110,6 @@ teardown: create: id: 2 index: everything - type: doc body: > { "name" : "doc2" @@ -126,9 +120,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "only_index", "_id": "3"}}' - '{"name": "doc3"}' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "4"}}' + - '{"index": {"_index": "everything", "_id": "4"}}' - '{"name": "doc4"}' - do: @@ -136,7 +130,7 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "only_index", "_id": "5"}}' - '{"name": "doc5"}' - do: @@ -144,7 +138,7 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "everything", "_type": "doc", "_id": "6"}}' + - '{"index": {"_index": "everything", "_id": "6"}}' - '{"name": "doc6"}' - do: # superuser @@ -170,7 +164,6 @@ teardown: refresh: true id: 7 index: only_read - type: doc body: > { "name" : "doc7" @@ -183,7 +176,6 @@ teardown: refresh: true id: 8 index: only_delete - type: doc body: > { "name" : "doc8" @@ -194,9 +186,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "9"}}' + - '{"index": {"_index": "only_read", "_id": "9"}}' - '{"name": "doc9"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "10"}}' + - '{"index": {"_index": "only_delete", "_id": "10"}}' - '{"name": "doc10"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -209,7 +201,7 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "11"}}' + - '{"index": {"_index": "only_read", "_id": "11"}}' - '{"name": "doc11"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -220,7 +212,7 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "12"}}' + - '{"index": {"_index": "only_delete", "_id": "12"}}' - '{"name": "doc12"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -245,9 +237,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "13"}}' + - '{"index": {"_index": "only_read", "_id": "13"}}' - '{"name": "doc13"}' - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "14"}}' + - '{"index": {"_index": "only_index", "_id": "14"}}' - '{"name": "doc14"}' - match: { errors: true } - match: { items.0.index.status: 403 } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/11_delete_doc.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/11_delete_doc.yml index 560c4a2cfb241..32e4694311f88 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/11_delete_doc.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/11_delete_doc.yml @@ -39,10 +39,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -53,10 +52,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: index: only_delete @@ -66,10 +64,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -80,34 +77,33 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "1"}}' + - '{"index": {"_index": "only_read", "_id": "1"}}' - '{"name": "doc1"}' - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "2"}}' + - '{"index": {"_index": "only_index", "_id": "2"}}' - '{"name": "doc2"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "only_delete", "_id": "3"}}' - '{"name": "doc3"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "4"}}' + - '{"index": {"_index": "only_delete", "_id": "4"}}' - '{"name": "doc4"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "only_delete", "_id": "5"}}' - '{"name": "doc5"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "6"}}' + - '{"index": {"_index": "only_delete", "_id": "6"}}' - '{"name": "doc6"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "7"}}' + - '{"index": {"_index": "only_delete", "_id": "7"}}' - '{"name": "doc7"}' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "8"}}' + - '{"index": {"_index": "everything", "_id": "8"}}' - '{"name": "doc8"}' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "9"}}' + - '{"index": {"_index": "everything", "_id": "9"}}' - '{"name": "doc9"}' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "10"}}' + - '{"index": {"_index": "everything", "_id": "10"}}' - '{"name": "doc10"}' --- @@ -144,7 +140,6 @@ teardown: delete: refresh: true index: only_delete - type: doc id: 3 - do: @@ -152,7 +147,6 @@ teardown: delete: refresh: true index: everything - type: doc id: 8 - do: @@ -160,16 +154,16 @@ teardown: bulk: refresh: true body: - - '{"delete": {"_index": "only_delete", "_type": "doc", "_id": "4"}}' - - '{"delete": {"_index": "everything" , "_type": "doc", "_id": "9"}}' + - '{"delete": {"_index": "only_delete", "_id": "4"}}' + - '{"delete": {"_index": "everything" , "_id": "9"}}' - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user bulk: refresh: true body: # The rest test won't send streaming content unless it has multiple bodies, so we send the same delete twice - - '{"delete": {"_index": "only_delete", "_type": "doc", "_id": "5"}}' - - '{"delete": {"_index": "only_delete", "_type": "doc", "_id": "5"}}' + - '{"delete": {"_index": "only_delete", "_id": "5"}}' + - '{"delete": {"_index": "only_delete", "_id": "5"}}' - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user @@ -178,11 +172,9 @@ teardown: body: # The rest test won't send streaming content unless it has multiple bodies, so we send the same delete twice - delete: _index: everything - _type: doc _id: 10 - delete: _index: everything - _type: doc _id: 10 - do: # superuser @@ -207,7 +199,6 @@ teardown: delete: refresh: true index: only_read - type: doc id: 1 - do: @@ -216,7 +207,6 @@ teardown: delete: refresh: true index: only_index - type: doc id: 2 - do: @@ -224,8 +214,8 @@ teardown: bulk: refresh: true body: - - '{"delete": {"_index": "only_read" , "_type": "doc", "_id": "1"}}' - - '{"delete": {"_index": "only_index", "_type": "doc", "_id": "2"}}' + - '{"delete": {"_index": "only_read" , "_id": "1"}}' + - '{"delete": {"_index": "only_index", "_id": "2"}}' - match: { errors: true } - match: { items.0.delete.status: 403 } @@ -238,8 +228,8 @@ teardown: bulk: refresh: true body: # The rest test won't send streaming content unless it has multiple bodies, so we send the same delete twice - - '{"delete": {"_index": "only_read" , "_type": "doc", "_id": "1"}}' - - '{"delete": {"_index": "only_read" , "_type": "doc", "_id": "1"}}' + - '{"delete": {"_index": "only_read" , "_id": "1"}}' + - '{"delete": {"_index": "only_read" , "_id": "1"}}' - match: { errors: true } - match: { items.0.delete.status: 403 } @@ -252,8 +242,8 @@ teardown: bulk: refresh: true body: # The rest test won't send streaming content unless it has multiple bodies, so we send the same delete twice - - '{"delete": {"_index": "only_index", "_type": "doc", "_id": "2"}}' - - '{"delete": {"_index": "only_index", "_type": "doc", "_id": "2"}}' + - '{"delete": {"_index": "only_index", "_id": "2"}}' + - '{"delete": {"_index": "only_index", "_id": "2"}}' - match: { errors: true } - match: { items.0.delete.status: 403 } @@ -282,8 +272,8 @@ teardown: bulk: refresh: true body: - - '{"delete": {"_index": "only_read" , "_type": "doc", "_id": "1"}}' - - '{"delete": {"_index": "only_delete", "_type": "doc", "_id": "6"}}' + - '{"delete": {"_index": "only_read" , "_id": "1"}}' + - '{"delete": {"_index": "only_delete", "_id": "6"}}' - match: { errors: true } - match: { items.0.delete.status: 403 } - match: { items.0.delete.error.type: "security_exception" } @@ -310,12 +300,12 @@ teardown: bulk: refresh: true body: - - '{"index" : {"_index": "only_delete", "_type": "doc", "_id": "11"}}' + - '{"index" : {"_index": "only_delete", "_id": "11"}}' - '{"name" : "doc11"}' - - '{"delete": {"_index": "only_delete", "_type": "doc", "_id": "7"}}' - - '{"index" : {"_index": "only_index", "_type": "doc", "_id": "12"}}' + - '{"delete": {"_index": "only_delete", "_id": "7"}}' + - '{"index" : {"_index": "only_index", "_id": "12"}}' - '{"name" : "doc12"}' - - '{"delete": {"_index": "only_index", "_type": "doc", "_id": "2"}}' + - '{"delete": {"_index": "only_index", "_id": "2"}}' - match: { errors: true } - match: { items.0.index.status: 403 } - match: { items.0.index.error.type: "security_exception" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/12_index_alias.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/12_index_alias.yml index 71b3275ccab0d..1f490ec08dac1 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/12_index_alias.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/12_index_alias.yml @@ -37,10 +37,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -51,10 +50,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -65,10 +63,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.put_alias: @@ -132,7 +129,6 @@ teardown: create: id: 1 index: can_write_1 - type: doc body: > { "name" : "doc1" @@ -143,7 +139,6 @@ teardown: create: id: 2 index: can_write_2 - type: doc body: > { "name" : "doc2" @@ -154,9 +149,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "can_write_1", "_id": "3"}}' - '{"name": "doc3"}' - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "4"}}' + - '{"index": {"_index": "can_write_1", "_id": "4"}}' - '{"name": "doc4"}' - do: @@ -164,9 +159,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "can_write_1", "_id": "5"}}' - '{"name": "doc5"}' - - '{"index": {"_index": "can_write_2", "_type": "doc", "_id": "6"}}' + - '{"index": {"_index": "can_write_2", "_id": "6"}}' - '{"name": "doc6"}' - do: @@ -174,11 +169,11 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "7"}}' + - '{"index": {"_index": "can_write_1", "_id": "7"}}' - '{"name": "doc7"}' - - '{"index": {"_index": "can_write_2", "_type": "doc", "_id": "8"}}' + - '{"index": {"_index": "can_write_2", "_id": "8"}}' - '{"name": "doc8"}' - - '{"index": {"_index": "can_write_3", "_type": "doc", "_id": "9"}}' + - '{"index": {"_index": "can_write_3", "_id": "9"}}' - '{"name": "doc9"}' - do: # superuser @@ -202,7 +197,6 @@ teardown: refresh: true id: 7 index: can_read_1 - type: doc body: > { "name" : "doc7" @@ -215,7 +209,6 @@ teardown: refresh: true id: 8 index: can_read_2 - type: doc body: > { "name" : "doc8" @@ -226,9 +219,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "9"}}' + - '{"index": {"_index": "can_read_1", "_id": "9"}}' - '{"name": "doc9"}' - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "10"}}' + - '{"index": {"_index": "can_read_1", "_id": "10"}}' - '{"name": "doc10"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -241,9 +234,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "11"}}' + - '{"index": {"_index": "can_read_1", "_id": "11"}}' - '{"name": "doc11"}' - - '{"index": {"_index": "can_read_2", "_type": "doc", "_id": "12"}}' + - '{"index": {"_index": "can_read_2", "_id": "12"}}' - '{"name": "doc12"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -264,9 +257,9 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "13"}}' + - '{"index": {"_index": "can_read_1", "_id": "13"}}' - '{"name": "doc13"}' - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "14"}}' + - '{"index": {"_index": "can_write_1", "_id": "14"}}' - '{"name": "doc14"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -285,15 +278,15 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "15"}}' + - '{"index": {"_index": "can_read_1", "_id": "15"}}' - '{"name": "doc15"}' - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "16"}}' + - '{"index": {"_index": "can_write_1", "_id": "16"}}' - '{"name": "doc16"}' - - '{"index": {"_index": "can_read_2", "_type": "doc", "_id": "17"}}' + - '{"index": {"_index": "can_read_2", "_id": "17"}}' - '{"name": "doc17"}' - - '{"index": {"_index": "can_write_2", "_type": "doc", "_id": "18"}}' + - '{"index": {"_index": "can_write_2", "_id": "18"}}' - '{"name": "doc18"}' - - '{"index": {"_index": "can_write_3", "_type": "doc", "_id": "19"}}' + - '{"index": {"_index": "can_write_3", "_id": "19"}}' - '{"name": "doc19"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -345,19 +338,19 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "can_read_1", "_type": "doc", "_id": "20"}}' + - '{"index": {"_index": "can_read_1", "_id": "20"}}' - '{"name": "doc20"}' - - '{"index": {"_index": "can_write_1", "_type": "doc", "_id": "21"}}' + - '{"index": {"_index": "can_write_1", "_id": "21"}}' - '{"name": "doc21"}' - - '{"index": {"_index": "can_read_2", "_type": "doc", "_id": "22"}}' + - '{"index": {"_index": "can_read_2", "_id": "22"}}' - '{"name": "doc22"}' - - '{"index": {"_index": "can_write_2", "_type": "doc", "_id": "23"}}' + - '{"index": {"_index": "can_write_2", "_id": "23"}}' - '{"name": "doc23"}' - - '{"index": {"_index": "can_write_3", "_type": "doc", "_id": "24"}}' + - '{"index": {"_index": "can_write_3", "_id": "24"}}' - '{"name": "doc24"}' - - '{"update": {"_index": "can_write_3", "_type": "doc", "_id": "24"}}' + - '{"update": {"_index": "can_write_3", "_id": "24"}}' - '{"doc": { "name": "doc_24"}}' - - '{"delete": {"_index": "can_write_3", "_type": "doc", "_id": "24"}}' + - '{"delete": {"_index": "can_write_3", "_id": "24"}}' - match: { errors: true } - match: { items.0.index.status: 403 } - match: { items.0.index.error.type: "security_exception" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/13_index_datemath.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/13_index_datemath.yml index becef57ec4f9a..462b023d18cc0 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/13_index_datemath.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/13_index_datemath.yml @@ -48,7 +48,6 @@ teardown: index: id: 1 index: "" - type: doc body: > { "name" : "doc1" @@ -58,9 +57,9 @@ teardown: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user bulk: body: - - '{"index": {"_index": "", "_type": "doc", "_id": "2"}}' + - '{"index": {"_index": "", "_id": "2"}}' - '{"name": "doc2"}' - - '{"index": {"_index": "", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "", "_id": "3"}}' - '{"name": "doc3"}' - match: { errors: false } - match: { items.0.index.status: 201 } @@ -84,7 +83,6 @@ teardown: index: id: 4 index: "" - type: doc body: > { "name" : "doc4" @@ -94,9 +92,9 @@ teardown: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user bulk: body: - - '{"index": {"_index": "", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "", "_id": "5"}}' - '{"name": "doc5"}' - - '{"index": {"_index": "", "_type": "doc", "_id": "6"}}' + - '{"index": {"_index": "", "_id": "6"}}' - '{"name": "doc6"}' - match: { errors: true } - match: { items.0.index.status: 403 } @@ -120,9 +118,9 @@ teardown: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user bulk: body: - - '{"index": {"_index": "", "_type": "doc", "_id": "7"}}' + - '{"index": {"_index": "", "_id": "7"}}' - '{"name": "doc7"}' - - '{"index": {"_index": "", "_type": "doc", "_id": "8"}}' + - '{"index": {"_index": "", "_id": "8"}}' - '{"name": "doc8"}' - match: { errors: true } - match: { items.0.index.status: 403 } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/20_get_doc.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/20_get_doc.yml index 5b6a0e2d331e1..4e9367c238ae7 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/20_get_doc.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/20_get_doc.yml @@ -40,10 +40,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: @@ -54,10 +53,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: index: only_delete @@ -67,10 +65,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: index: read_write @@ -80,10 +77,9 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: indices.create: index: everything @@ -93,24 +89,23 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" + properties: + name: + type: "keyword" - do: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "1"}}' + - '{"index": {"_index": "only_read", "_id": "1"}}' - '{"name": "doc1"}' - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "2"}}' + - '{"index": {"_index": "only_index", "_id": "2"}}' - '{"name": "doc2"}' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "only_delete", "_id": "3"}}' - '{"name": "doc3"}' - - '{"index": {"_index": "read_write", "_type": "doc", "_id": "4"}}' + - '{"index": {"_index": "read_write", "_id": "4"}}' - '{"name": "doc4"}' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "everything", "_id": "5"}}' - '{"name": "doc5"}' --- @@ -133,7 +128,6 @@ teardown: get: id: 1 index: only_read - type: doc - match: { _index: only_read } - match: { _id: "1" } @@ -144,7 +138,6 @@ teardown: get: id: 4 index: read_write - type: doc - match: { _index: read_write } - match: { _id: "4" } - match: { _source.name: "doc4" } @@ -154,7 +147,6 @@ teardown: get: id: 5 index: everything - type: doc - match: { _index: everything } - match: { _id: "5" } - match: { _source.name: "doc5" } @@ -164,9 +156,9 @@ teardown: mget: body: docs: - - { _index: "only_read", _type: "doc", _id: "1" } - - { _index: "read_write", _type: "doc", _id: "4" } - - { _index: "everything", _type: "doc", _id: "5" } + - { _index: "only_read", _id: "1" } + - { _index: "read_write", _id: "4" } + - { _index: "everything", _id: "5" } - match: { docs.0._index: "only_read" } - match: { docs.0._id: "1" } - match: { docs.0._source.name: "doc1" } @@ -182,7 +174,7 @@ teardown: mget: body: docs: - - { _index: "only_read", _type: "doc", _id: "1" } + - { _index: "only_read", _id: "1" } - match: { docs.0._index: "only_read"} - match: { docs.0._id: "1" } - match: { docs.0._source.name: "doc1" } @@ -192,7 +184,7 @@ teardown: mget: body: docs: - - { _index: "read_write", _type: "doc", _id: "4" } + - { _index: "read_write", _id: "4" } - match: { docs.0._index: read_write} - match: { docs.0._id: "4" } - match: { docs.0._source.name: "doc4" } @@ -202,7 +194,7 @@ teardown: mget: body: docs: - - { _index: "everything", _type: "doc", _id: "5" } + - { _index: "everything", _id: "5" } - match: { docs.0._index: "everything"} - match: { docs.0._id: "5" } - match: { docs.0._source.name: "doc5" } @@ -216,7 +208,6 @@ teardown: get: id: 2 index: only_index - type: doc - do: catch: forbidden @@ -224,15 +215,14 @@ teardown: get: id: 3 index: only_delete - type: doc - do: headers: { Authorization: "Basic dGVzdF91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" } # test_user mget: body: docs: - - { _index: "only_index", _type: "doc", _id: "2" } - - { _index: "only_delete", _type: "doc", _id: "3" } + - { _index: "only_index", _id: "2" } + - { _index: "only_delete", _id: "3" } - match: { docs.0._index: "only_index"} - match: { docs.0._id: "2" } - match: { docs.0.error.type: "security_exception" } @@ -245,7 +235,7 @@ teardown: mget: body: docs: - - { _index: "only_index", _type: "doc", _id: "2" } + - { _index: "only_index", _id: "2" } - match: { docs.0._index: "only_index"} - match: { docs.0._id: "2" } - match: { docs.0.error.type: "security_exception" } @@ -255,7 +245,7 @@ teardown: mget: body: docs: - - { _index: "only_delete", _type: "doc", _id: "3" } + - { _index: "only_delete", _id: "3" } - match: { docs.0._index: "only_delete"} - match: { docs.0._id: "3" } - match: { docs.0.error.type: "security_exception" } @@ -267,11 +257,11 @@ teardown: mget: body: docs: - - { _index: "only_read" , _type: "doc", _id: "1" } - - { _index: "only_index" , _type: "doc", _id: "2" } - - { _index: "only_delete", _type: "doc", _id: "3" } - - { _index: "read_write" , _type: "doc", _id: "4" } - - { _index: "everything" , _type: "doc", _id: "5" } + - { _index: "only_read" , _id: "1" } + - { _index: "only_index" , _id: "2" } + - { _index: "only_delete", _id: "3" } + - { _index: "read_write" , _id: "4" } + - { _index: "everything" , _id: "5" } - match: { docs.0._index: "only_read" } - match: { docs.0._id: "1" } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/21_search_doc.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/21_search_doc.yml index 5901a8c66b28a..cd7b4772ce949 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/21_search_doc.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/21_search_doc.yml @@ -40,12 +40,11 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" - tag: - type: "keyword" + properties: + name: + type: "keyword" + tag: + type: "keyword" - do: indices.create: index: only_index @@ -55,12 +54,11 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" - tag: - type: "keyword" + properties: + name: + type: "keyword" + tag: + type: "keyword" - do: indices.create: index: only_delete @@ -70,12 +68,11 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" - tag: - type: "keyword" + properties: + name: + type: "keyword" + tag: + type: "keyword" - do: indices.create: index: read_write @@ -85,12 +82,11 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" - tag: - type: "keyword" + properties: + name: + type: "keyword" + tag: + type: "keyword" - do: indices.create: index: everything @@ -100,35 +96,34 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - doc: - properties: - name: - type: "keyword" - tag: - type: "keyword" + properties: + name: + type: "keyword" + tag: + type: "keyword" - do: bulk: refresh: true body: - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "1"}}' + - '{"index": {"_index": "only_read", "_id": "1"}}' - '{"name": "doc1", "tag": [ "can-read", "tag-a" ] }' - - '{"index": {"_index": "only_read", "_type": "doc", "_id": "2"}}' + - '{"index": {"_index": "only_read", "_id": "2"}}' - '{"name": "doc2", "tag": [ "can-read", "tag-b"] }' - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "3"}}' + - '{"index": {"_index": "only_index", "_id": "3"}}' - '{"name": "doc3", "tag": [ "no-read", "tag-a"] }' - - '{"index": {"_index": "only_index", "_type": "doc", "_id": "4"}}' + - '{"index": {"_index": "only_index", "_id": "4"}}' - '{"name": "doc4", "tag": [ "no-read", "tag-b"] }' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "5"}}' + - '{"index": {"_index": "only_delete", "_id": "5"}}' - '{"name": "doc5", "tag": [ "no-read", "tag-a"] }' - - '{"index": {"_index": "only_delete", "_type": "doc", "_id": "6"}}' + - '{"index": {"_index": "only_delete", "_id": "6"}}' - '{"name": "doc6", "tag": [ "no-read", "tag-b"] }' - - '{"index": {"_index": "read_write", "_type": "doc", "_id": "7"}}' + - '{"index": {"_index": "read_write", "_id": "7"}}' - '{"name": "doc7", "tag": [ "can-read", "tag-a" ] }' - - '{"index": {"_index": "read_write", "_type": "doc", "_id": "8"}}' + - '{"index": {"_index": "read_write", "_id": "8"}}' - '{"name": "doc8", "tag": [ "can-read", "tag-b"] }' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "9"}}' + - '{"index": {"_index": "everything", "_id": "9"}}' - '{"name": "doc9", "tag": [ "can-read", "tag-a" ] }' - - '{"index": {"_index": "everything", "_type": "doc", "_id": "10"}}' + - '{"index": {"_index": "everything", "_id": "10"}}' - '{"name": "doc10", "tag": [ "can-read", "tag-b"] }' --- diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/30_dynamic_put_mapping.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/30_dynamic_put_mapping.yml index a0fbed057bc73..8176a276b0301 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/30_dynamic_put_mapping.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/30_dynamic_put_mapping.yml @@ -72,7 +72,6 @@ teardown: create: id: 1 index: write_alias - type: doc body: > { "name" : "doc1" @@ -83,7 +82,6 @@ teardown: create: id: 2 index: write_alias - type: doc body: > { "name2" : "doc2" diff --git a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml index fa8172697287e..1537d361a3afb 100644 --- a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml +++ b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/10_basic.yml @@ -53,15 +53,15 @@ teardown: bulk: refresh: true body: - - '{"index": {"_index": "local_index", "_type": "test_type"}}' + - '{"index": {"_index": "local_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - - '{"index": {"_index": "local_index", "_type": "test_type"}}' + - '{"index": {"_index": "local_index"}}' - '{"f1": "local_cluster", "filter_field": 1}' - - '{"index": {"_index": "local_index", "_type": "test_type"}}' + - '{"index": {"_index": "local_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - - '{"index": {"_index": "local_index", "_type": "test_type"}}' + - '{"index": {"_index": "local_index"}}' - '{"f1": "local_cluster", "filter_field": 1}' - - '{"index": {"_index": "local_index", "_type": "test_type"}}' + - '{"index": {"_index": "local_index"}}' - '{"f1": "local_cluster", "filter_field": 0}' - do: diff --git a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml index 9bc4daa655c5f..d4d83937654fe 100644 --- a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml +++ b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/30_field_caps.yml @@ -44,25 +44,24 @@ teardown: index: field_caps_index_2 body: mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: double - geo: - type: geo_point - object: - type: object - properties: - nested1 : - type : text - index: true - nested2: - type: float - doc_values: true + properties: + text: + type: text + keyword: + type: keyword + number: + type: double + geo: + type: geo_point + object: + type: object + properties: + nested1 : + type : text + index: true + nested2: + type: float + doc_values: true - do: headers: { Authorization: "Basic am9lOnMza3JpdA==" } diff --git a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/60_skip_shards.yml b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/60_skip_shards.yml index d74e82edca7f0..832b7deb8ec78 100644 --- a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/60_skip_shards.yml +++ b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/multi_cluster/60_skip_shards.yml @@ -49,17 +49,16 @@ teardown: number_of_shards: 1 number_of_replicas: 0 mappings: - test_type: - properties: - created_at: - type: date - format: "yyyy-MM-dd" + properties: + created_at: + type: date + format: "yyyy-MM-dd" - do: bulk: refresh: true body: - - '{"index": {"_index": "skip_shards_index", "_type": "test_type"}}' + - '{"index": {"_index": "skip_shards_index"}}' - '{"f1": "local_cluster", "sort_field": 0, "created_at" : "2017-01-01"}' # check that we skip the remote shard diff --git a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml index f9a37dd829430..32549c586d384 100644 --- a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml +++ b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml @@ -40,17 +40,16 @@ setup: number_of_shards: 1 number_of_replicas: 0 mappings: - test_type: - properties: - created_at: - type: date - format: "yyyy-MM-dd" + properties: + created_at: + type: date + format: "yyyy-MM-dd" - do: bulk: refresh: true body: - - '{"index": {"_index": "single_doc_index", "_type": "test_type"}}' + - '{"index": {"_index": "single_doc_index"}}' - '{"f1": "remote_cluster", "sort_field": 1, "created_at" : "2016-01-01"}' - do: @@ -58,49 +57,47 @@ setup: index: field_caps_index_1 body: mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: double - geo: - type: geo_point - object: - type: object - properties: - nested1 : - type : text - index: false - nested2: - type: float - doc_values: false + properties: + text: + type: text + keyword: + type: keyword + number: + type: double + geo: + type: geo_point + object: + type: object + properties: + nested1 : + type : text + index: false + nested2: + type: float + doc_values: false - do: indices.create: index: field_caps_index_3 body: mappings: - t: - properties: - text: - type: text - keyword: - type: keyword - number: - type: long - geo: - type: keyword - object: - type: object - properties: - nested1 : - type : long - index: false - nested2: - type: keyword - doc_values: false + properties: + text: + type: text + keyword: + type: keyword + number: + type: long + geo: + type: keyword + object: + type: object + properties: + nested1 : + type : long + index: false + nested2: + type: keyword + doc_values: false - do: indices.create: @@ -130,19 +127,19 @@ setup: bulk: refresh: true body: - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 1}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "test_index", "_type": "test_type"}}' + - '{"index": {"_index": "test_index"}}' - '{"f1": "remote_cluster", "filter_field": 0}' - - '{"index": {"_index": "secured_via_alias", "_type": "test_type"}}' + - '{"index": {"_index": "secured_via_alias"}}' - '{"f1": "remote_cluster", "secure": true}' diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml index 1d5f89667db65..0c5deab19068d 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/10_basic.yml @@ -3,7 +3,6 @@ - do: get: index: scroll_index - type: doc id: 1 - set: {_source.value: scroll_id} diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/40_ml_datafeed_crud.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/40_ml_datafeed_crud.yml index 39864ae6d9cf0..928fb3a066c28 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/40_ml_datafeed_crud.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/40_ml_datafeed_crud.yml @@ -11,10 +11,9 @@ setup: index: airline-data body: mappings: - response: - properties: - time: - type: date + properties: + time: + type: date --- "Test old and mixed cluster datafeeds":