From 96476d8bd260d231ac991dfcd4520d1e7524f1c7 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Mon, 31 Jan 2022 14:59:12 -0800 Subject: [PATCH] Remove type param from yml and integ test files Signed-off-by: Suraj Singh --- .../test/rest/RequestsWithoutContentIT.java | 2 +- .../test/ingest/200_dissect_processor.yml | 1 - .../rest-api-spec/test/ingest/80_foreach.yml | 2 - .../upgrades/FullClusterRestartIT.java | 3 +- .../org/opensearch/backwards/IndexingIT.java | 4 +- .../org/opensearch/upgrades/RecoveryIT.java | 6 +- .../ingest_mustache/10_ingest_disabled.yml | 5 - .../10_pipeline_with_mustache_templates.yml | 20 +-- .../test/ingest/20_combine_processors.yml | 4 - .../test/ingest/40_reindex_with_ingest.yml | 1 - .../50_script_processor_using_painless.yml | 4 - .../test/bulk/41_source_with_types.yml | 76 --------- .../test/bulk/81_cas_with_types.yml | 45 ------ .../test/count/11_basic_with_types.yml | 5 - .../test/create/11_with_id_with_types.yml | 33 ---- .../test/create/15_without_id_with_types.yml | 8 - .../create/36_external_version_with_types.yml | 2 - .../test/create/41_routing_with_types.yml | 43 ----- .../test/create/61_refresh_with_types.yml | 82 ---------- .../test/create/71_nested_with_types.yml | 42 ----- .../test/delete/13_basic_with_types.yml | 19 --- .../delete/14_shard_header_with_types.yml | 36 ----- .../test/delete/15_result_with_types.yml | 26 --- .../test/delete/21_cas_with_types.yml | 30 ---- .../delete/27_external_version_with_types.yml | 32 ---- .../28_external_gte_version_with_types.yml | 53 ------- .../test/delete/31_routing_with_types.yml | 32 ---- .../test/delete/51_refresh_with_types.yml | 148 ----------------- .../test/delete/61_missing_with_types.yml | 19 --- .../test/delete/70_mix_typeless_typeful.yml | 43 ----- .../test/exists/11_basic_with_types.yml | 36 ----- .../test/exists/41_routing_with_types.yml | 41 ----- .../exists/61_realtime_refresh_with_types.yml | 50 ------ .../test/exists/71_defaults_with_types.yml | 17 -- .../test/explain/11_basic_with_types.yml | 66 -------- .../21_source_filtering_with_types.yml | 44 ------ .../explain/31_query_string_with_types.yml | 71 --------- .../test/explain/40_mix_typeless_typeful.yml | 57 ------- .../test/get/100_mix_typeless_typeful.yml | 47 ------ .../test/get/11_basic_with_types.yml | 31 ---- .../test/get/16_default_values_with_types.yml | 21 --- .../test/get/21_stored_fields_with_types.yml | 60 ------- .../test/get/41_routing_with_types.yml | 43 ----- .../test/get/51_with_headers_with_types.yml | 26 --- .../get/61_realtime_refresh_with_types.yml | 49 ------ .../get/71_source_filtering_with_types.yml | 69 -------- .../test/get/81_missing_with_types.yml | 19 --- .../test/get/91_versions_with_types.yml | 89 ----------- .../test/get_source/11_basic_with_types.yml | 17 -- .../16_default_values_with_types.yml | 16 -- .../test/get_source/41_routing_with_types.yml | 42 ----- .../61_realtime_refresh_with_types.yml | 49 ------ .../71_source_filtering_with_types.yml | 27 ---- .../test/get_source/81_missing_with_types.yml | 19 --- .../86_source_missing_with_types.yml | 39 ----- .../test/index/11_with_id_with_types.yml | 34 ---- .../test/index/13_result_with_types.yml | 21 --- .../test/index/16_without_id_with_types.yml | 26 --- .../test/index/21_optype_with_types.yml | 29 ---- .../index/37_external_version_with_types.yml | 55 ------- .../38_external_gte_version_with_types.yml | 56 ------- .../test/index/41_routing_with_types.yml | 43 ----- .../test/index/61_refresh_with_types.yml | 83 ---------- .../indices.create/11_basic_with_types.yml | 143 ----------------- .../20_mix_typeless_typeful.yml | 149 ------------------ .../test/indices.flush/10_basic.yml | 1 - .../test/indices.rollover/10_basic.yml | 6 +- .../indices.rollover/20_max_doc_condition.yml | 2 - .../30_max_size_condition.yml | 1 - .../41_mapping_with_types.yml | 47 ------ .../test/indices.segments/10_basic.yml | 2 - .../test/indices.shard_stores/10_basic.yml | 3 - .../test/indices.stats/15_types.yml | 81 ---------- .../test/mget/11_default_index_type.yml | 44 ------ .../test/mget/16_basic_with_types.yml | 45 ------ .../mget/18_non_existent_index_with_types.yml | 30 ---- .../mget/19_missing_metadata_with_types.yml | 47 ------ ...1_alias_to_multiple_indices_with_types.yml | 45 ------ .../test/mget/22_ids_with_types.yml | 72 --------- .../test/mget/23_stored_fields_with_types.yml | 120 -------------- .../test/mget/41_routing_with_types.yml | 44 ------ .../mget/61_realtime_refresh_with_types.yml | 53 ------- .../mget/71_source_filtering_with_types.yml | 119 -------------- .../test/mget/80_deprecated_with_types.yml | 38 ----- .../test/msearch/12_basic_with_types.yml | 97 ------------ .../test/mtermvectors/11_basic_with_types.yml | 86 ---------- .../mtermvectors/21_deprecated_with_types.yml | 53 ------- .../51_filter_with_types.yml | 60 ------- .../test/termvectors/11_basic_with_types.yml | 36 ----- .../termvectors/21_issue7121_with_types.yml | 42 ----- .../termvectors/31_realtime_with_types.yml | 40 ----- .../termvectors/50_mix_typeless_typeful.yml | 46 ------ .../update/14_shard_header_with_types.yml | 39 ----- .../rest-api-spec/test/update/16_noop.yml | 3 - .../test/update/61_refresh_with_types.yml | 115 -------------- .../test/update/90_mix_typeless_typeful.yml | 86 ---------- 96 files changed, 12 insertions(+), 4001 deletions(-) delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/bulk/41_source_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/bulk/81_cas_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/create/11_with_id_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/create/15_without_id_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/create/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/create/61_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/13_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/14_shard_header_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/15_result_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/21_cas_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/27_external_version_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/28_external_gte_version_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/31_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/51_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/61_missing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/exists/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/exists/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/exists/61_realtime_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/exists/71_defaults_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/explain/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/explain/21_source_filtering_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/16_default_values_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/51_with_headers_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/61_realtime_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/81_missing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get/91_versions_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/16_default_values_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/61_realtime_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/71_source_filtering_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/81_missing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/11_with_id_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/13_result_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/16_without_id_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/21_optype_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/37_external_version_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/38_external_gte_version_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/index/61_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/41_mapping_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/15_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/11_default_index_type.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/16_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/18_non_existent_index_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/19_missing_metadata_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/21_alias_to_multiple_indices_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/22_ids_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/41_routing_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/61_realtime_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/71_source_filtering_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mget/80_deprecated_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/msearch/12_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/51_filter_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/31_realtime_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/update/14_shard_header_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/update/61_refresh_with_types.yml delete mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml diff --git a/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/RequestsWithoutContentIT.java b/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/RequestsWithoutContentIT.java index 474f7052b8450..92c35ccf316c7 100644 --- a/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/RequestsWithoutContentIT.java +++ b/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/RequestsWithoutContentIT.java @@ -43,7 +43,7 @@ public class RequestsWithoutContentIT extends OpenSearchRestTestCase { public void testIndexMissingBody() throws IOException { ResponseException responseException = expectThrows(ResponseException.class, () -> - client().performRequest(new Request(randomBoolean() ? "POST" : "PUT", "/idx/type/123"))); + client().performRequest(new Request(randomBoolean() ? "POST" : "PUT", "/idx/_doc/123"))); assertResponseException(responseException, "request body is required"); } diff --git a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml index 709d4b9e62d43..916a7fe656cc2 100644 --- a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml +++ b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/200_dissect_processor.yml @@ -62,7 +62,6 @@ teardown: catch: '/Unable to find match for dissect pattern: \%\{a\},\%\{b\},\%\{c\} against source: foo bar baz/' index: index: test - type: test id: 2 pipeline: "my_pipeline" body: {message: "foo bar baz"} diff --git a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml index 7fbf182eac05f..9142317ce1507 100644 --- a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml +++ b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_foreach.yml @@ -31,7 +31,6 @@ teardown: - do: index: index: test - type: test id: 1 pipeline: "my_pipeline" body: > @@ -42,7 +41,6 @@ teardown: - do: get: index: test - type: test id: 1 - match: { _source.values: ["FOO", "BAR", "BAZ"] } diff --git a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java index 6e8a4daaf5b54..ee903dc0f2e59 100644 --- a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java @@ -1509,8 +1509,7 @@ public void testSystemIndexMetadataIsUpgraded() throws Exception { Request bulk = new Request("POST", "/_bulk"); bulk.addParameter("refresh", "true"); - bulk.setJsonEntity("{\"index\": {\"_index\": \"test_index_old\", \"_type\" : \"" + type + "\"}}\n" + - "{\"f1\": \"v1\", \"f2\": \"v2\"}\n"); + bulk.setJsonEntity("{\"index\": {\"_index\": \"test_index_old\"}}\n" + "{\"f1\": \"v1\", \"f2\": \"v2\"}\n"); client().performRequest(bulk); // start a async reindex job diff --git a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java index 4bf0e899e92fb..a0c8e8b9a03ac 100644 --- a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java +++ b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java @@ -67,7 +67,7 @@ public class IndexingIT extends OpenSearchRestTestCase { private int indexDocs(String index, final int idStart, final int numDocs) throws IOException { for (int i = 0; i < numDocs; i++) { final int id = idStart + i; - Request request = new Request("PUT", index + "/doc/" + id); + Request request = new Request("PUT", index + "/_doc/" + id); request.setJsonEntity("{\"test\": \"test_" + randomAlphaOfLength(2) + "\"}"); assertOK(client().performRequest(request)); } @@ -363,7 +363,7 @@ private void assertCount(final String index, final String preference, final int } private void assertVersion(final String index, final int docId, final String preference, final int expectedVersion) throws IOException { - Request request = new Request("GET", index + "/doc/" + docId); + Request request = new Request("GET", index + "/_doc/" + docId); request.addParameter("preference", preference); request.setOptions(expectWarnings(RestGetAction.TYPES_DEPRECATION_MESSAGE)); diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java index 8fbeaabd6d7e1..41af456d3c44a 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/RecoveryIT.java @@ -123,7 +123,7 @@ public void testHistoryUUIDIsGenerated() throws Exception { private int indexDocs(String index, final int idStart, final int numDocs) throws IOException { for (int i = 0; i < numDocs; i++) { final int id = idStart + i; - Request indexDoc = new Request("PUT", index + "/test/" + id); + Request indexDoc = new Request("PUT", index + "/_doc/" + id); indexDoc.setJsonEntity("{\"test\": \"test_" + randomAsciiOfLength(2) + "\"}"); client().performRequest(indexDoc); } @@ -658,7 +658,7 @@ public void testUpdateDoc() throws Exception { final int times = randomIntBetween(0, 2); for (int i = 0; i < times; i++) { long value = randomNonNegativeLong(); - Request update = new Request("POST", index + "/test/" + docId + "/_update"); + Request update = new Request("POST", index + "/_update/" + docId); update.setOptions(expectWarnings(RestUpdateAction.TYPES_DEPRECATION_MESSAGE)); update.setJsonEntity("{\"doc\": {\"updated_field\": " + value + "}}"); client().performRequest(update); @@ -667,7 +667,7 @@ public void testUpdateDoc() throws Exception { } client().performRequest(new Request("POST", index + "/_refresh")); for (int docId : updates.keySet()) { - Request get = new Request("GET", index + "/test/" + docId); + Request get = new Request("GET", index + "/_doc/" + docId); get.setOptions(expectWarnings(RestGetAction.TYPES_DEPRECATION_MESSAGE)); Map doc = entityAsMap(client().performRequest(get)); assertThat(XContentMapValues.extractValue("_source.updated_field", doc), equalTo(updates.get(docId))); diff --git a/qa/smoke-test-ingest-disabled/src/test/resources/rest-api-spec/test/ingest_mustache/10_ingest_disabled.yml b/qa/smoke-test-ingest-disabled/src/test/resources/rest-api-spec/test/ingest_mustache/10_ingest_disabled.yml index 5a3f64151f4ed..b70ad87387db6 100644 --- a/qa/smoke-test-ingest-disabled/src/test/resources/rest-api-spec/test/ingest_mustache/10_ingest_disabled.yml +++ b/qa/smoke-test-ingest-disabled/src/test/resources/rest-api-spec/test/ingest_mustache/10_ingest_disabled.yml @@ -74,7 +74,6 @@ catch: /There are no ingest nodes in this cluster, unable to forward request to an ingest node./ index: index: test - type: test id: 1 pipeline: "my_pipeline_1" body: { @@ -92,12 +91,10 @@ body: - index: _index: test_index - _type: test_type _id: test_id - f1: v1 - index: _index: test_index - _type: test_type _id: test_id2 - f1: v2 @@ -109,12 +106,10 @@ body: - index: _index: test_index - _type: test_type _id: test_id - f1: v1 - index: _index: test_index - _type: test_type _id: test_id2 pipeline: my_pipeline_1 - f1: v2 diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/10_pipeline_with_mustache_templates.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/10_pipeline_with_mustache_templates.yml index 5ffaebdcaef36..0235a346ad3d7 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/10_pipeline_with_mustache_templates.yml +++ b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/10_pipeline_with_mustache_templates.yml @@ -14,13 +14,13 @@ { "set" : { "field" : "index_type_id", - "value": "{{_index}}/{{_type}}/{{_id}}" + "value": "{{_index}}/{{_id}}" } }, { "append" : { "field" : "metadata", - "value": ["{{_index}}", "{{_type}}", "{{_id}}"] + "value": ["{{_index}}", "{{_id}}"] } } ] @@ -30,7 +30,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline_1" body: {} @@ -38,11 +37,10 @@ - do: get: index: test - type: test id: 1 - length: { _source: 2 } - - match: { _source.index_type_id: "test/test/1" } - - match: { _source.metadata: ["test", "test", "1"] } + - match: { _source.index_type_id: "test/1" } + - match: { _source.metadata: ["test", "1"] } --- "Test templating": @@ -110,7 +108,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline_1" body: { @@ -123,7 +120,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 5 } - match: { _source.field1: "1" } @@ -135,7 +131,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline_2" body: { @@ -145,7 +140,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 2 } - match: { _source.field1: "field2" } @@ -154,7 +148,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline_3" body: { @@ -165,7 +158,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 1 } - match: { _source.field_to_remove: "field2" } @@ -204,7 +196,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_handled_pipeline" body: { @@ -214,7 +205,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 2 } - match: { _source.do_nothing: "foo" } @@ -246,7 +236,6 @@ - do: index: index: test - type: test id: 1 pipeline: "_id" body: { @@ -268,7 +257,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 2 } - match: { _source.values_flat: ["foo_bar", "foo_baz"] } diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml index c121d542c86b1..6d567d64532c7 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml +++ b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/20_combine_processors.yml @@ -48,7 +48,6 @@ - do: index: index: test - type: test id: 1 pipeline: "_id" body: { @@ -58,7 +57,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 13 } - match: { _source.request: "/presentations/logstash-scale11x/images/ahhh___rage_face_by_samusmmx-d5g5zap.png" } @@ -137,7 +135,6 @@ - do: index: index: test - type: test id: 1 pipeline: "_id" body: { @@ -178,7 +175,6 @@ - do: get: index: test - type: test id: 1 - length: { _source: 11 } - is_false: _source.friends.0.id diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/40_reindex_with_ingest.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/40_reindex_with_ingest.yml index e34ca43a62282..eb1c0d2eef7c5 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/40_reindex_with_ingest.yml +++ b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/40_reindex_with_ingest.yml @@ -18,7 +18,6 @@ - do: index: index: twitter - type: tweet id: 1 body: { "user": "foobar" } - do: diff --git a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/50_script_processor_using_painless.yml b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/50_script_processor_using_painless.yml index cce388c2ff737..eaf6b24030a06 100644 --- a/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/50_script_processor_using_painless.yml +++ b/qa/smoke-test-ingest-with-all-dependencies/src/test/resources/rest-api-spec/test/ingest/50_script_processor_using_painless.yml @@ -22,7 +22,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline" body: { bytes_in: 1234, bytes_out: 4321 } @@ -30,7 +29,6 @@ - do: get: index: test - type: test id: 1 - match: { _source.bytes_in: 1234 } - match: { _source.bytes_out: 4321 } @@ -72,7 +70,6 @@ - do: index: index: test - type: test id: 1 pipeline: "my_pipeline" body: { bytes_in: 1234, bytes_out: 4321 } @@ -80,7 +77,6 @@ - do: get: index: test - type: test id: 1 - match: { _source.bytes_in: 1234 } - match: { _source.bytes_out: 4321 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/41_source_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/41_source_with_types.yml deleted file mode 100644 index 3c8a86c13bdac..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/41_source_with_types.yml +++ /dev/null @@ -1,76 +0,0 @@ ---- -"Source filtering": - - do: - index: - refresh: true - index: test_index - type: test_type - id: test_id_1 - body: { "foo": "bar", "bar": "foo" } - - - do: - index: - refresh: true - index: test_index - type: test_type - id: test_id_2 - body: { "foo": "qux", "bar": "pux" } - - - do: - index: - refresh: true - index: test_index - type: test_type - id: test_id_3 - body: { "foo": "corge", "bar": "forge" } - - - - do: - bulk: - refresh: true - body: | - { "update": { "_index": "test_index", "_type": "test_type", "_id": "test_id_1", "_source": true } } - { "doc": { "foo": "baz" } } - { "update": { "_index": "test_index", "_type": "test_type", "_id": "test_id_2" } } - { "_source": true, "doc": { "foo": "quux" } } - - - match: { items.0.update.get._source.foo: baz } - - match: { items.1.update.get._source.foo: quux } - - - do: - bulk: - index: test_index - type: test_type - _source: true - body: | - { "update": { "_id": "test_id_3" } } - { "doc": { "foo": "garply" } } - - - match: { items.0.update.get._source.foo: garply } - - - do: - bulk: - refresh: true - body: | - { "update": { "_index": "test_index", "_type": "test_type", "_id": "test_id_1", "_source": {"includes": "bar"} } } - { "doc": { "foo": "baz" } } - { "update": { "_index": "test_index", "_type": "test_type", "_id": "test_id_2" } } - { "_source": {"includes": "foo"}, "doc": { "foo": "quux" } } - - - match: { items.0.update.get._source.bar: foo } - - is_false: items.0.update.get._source.foo - - match: { items.1.update.get._source.foo: quux } - - is_false: items.1.update.get._source.bar - - - do: - bulk: - index: test_index - type: test_type - _source_includes: foo - body: | - { "update": { "_id": "test_id_3" } } - { "doc": { "foo": "garply" } } - - - match: { items.0.update.get._source.foo: garply } - - is_false: items.0.update.get._source.bar - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/81_cas_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/81_cas_with_types.yml deleted file mode 100644 index 101316e7bf504..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/bulk/81_cas_with_types.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -"Compare And Swap Sequence Numbers": - - - skip: - version: " - 6.6.99" - reason: cas operations with sequence numbers was added in 6.7 - - - do: - index: - index: test_1 - type: _doc - id: 1 - body: { foo: bar } - - match: { _version: 1} - - set: { _seq_no: seqno } - - set: { _primary_term: primary_term } - - - do: - bulk: - body: - - index: - _index: test_1 - _type: _doc - _id: 1 - if_seq_no: 10000 - if_primary_term: $primary_term - - foo: bar2 - - - match: { errors: true } - - match: { items.0.index.status: 409 } - - match: { items.0.index.error.type: version_conflict_engine_exception } - - - do: - bulk: - body: - - index: - _index: test_1 - _type: _doc - _id: 1 - if_seq_no: $seqno - if_primary_term: $primary_term - - foo: bar2 - - - match: { errors: false} - - match: { items.0.index.status: 200 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/count/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/count/11_basic_with_types.yml index 48cfc610b435e..09d96670f688e 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/count/11_basic_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/count/11_basic_with_types.yml @@ -5,7 +5,6 @@ setup: - do: index: index: test - type: test id: 1 body: { foo: bar } @@ -18,7 +17,6 @@ setup: - do: count: index: test - type: test body: query: match: @@ -42,7 +40,6 @@ setup: - do: count: index: test - type: test body: { } - match: {count : 1} @@ -50,7 +47,6 @@ setup: - do: count: index: test - type: test - match: {count : 1} @@ -60,7 +56,6 @@ setup: catch: bad_request count: index: test - type: test body: match: foo: bar diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/11_with_id_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/11_with_id_with_types.yml deleted file mode 100644 index 1e58c38c7b589..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/11_with_id_with_types.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -"Create with ID": - - do: - create: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: "1"} - - match: { _version: 1} - - - do: - get: - index: test_1 - type: test - id: 1 - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: "1"} - - match: { _version: 1} - - match: { _source: { foo: bar }} - - - do: - catch: conflict - create: - index: test_1 - type: test - id: 1 - body: { foo: bar } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/15_without_id_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/15_without_id_with_types.yml deleted file mode 100644 index ab9932819381f..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/15_without_id_with_types.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -"Create without ID": - - do: - catch: param - create: - index: test_1 - type: test - body: { foo: bar } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/36_external_version_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/36_external_version_with_types.yml index cb8c041d7102c..86d0d4b59e06b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/36_external_version_with_types.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/create/36_external_version_with_types.yml @@ -5,7 +5,6 @@ catch: bad_request create: index: test - type: test id: 1 body: { foo: bar } version_type: external @@ -19,7 +18,6 @@ catch: bad_request create: index: test - type: test id: 2 body: { foo: bar } version_type: external diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/41_routing_with_types.yml deleted file mode 100644 index 752489f722c9e..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/41_routing_with_types.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - create: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - get: - index: test_1 - type: test - id: 1 - routing: 5 - stored_fields: [_routing] - - - match: { _id: "1"} - - match: { _routing: "5"} - - - do: - catch: missing - get: - index: test_1 - type: test - id: 1 - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/create/61_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/create/61_refresh_with_types.yml deleted file mode 100644 index e24bdf4260340..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/61_refresh_with_types.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -"Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index.refresh_interval: -1 - number_of_replicas: 0 - - do: - create: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - - match: { hits.total: 0 } - - - do: - create: - index: test_1 - type: test - id: 2 - refresh: true - body: { foo: bar } - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 2 }} - - - match: { hits.total: 1 } - ---- -"When refresh url parameter is an empty string that means \"refresh immediately\"": - - do: - create: - index: test_1 - type: test - id: 1 - refresh: "" - body: { foo: bar } - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - - match: { hits.total: 1 } - ---- -"refresh=wait_for waits until changes are visible in search": - - do: - index: - index: create_60_refresh_1 - type: test - id: create_60_refresh_id1 - body: { foo: bar } - refresh: wait_for - - is_false: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: create_60_refresh_1 - body: - query: { term: { _id: create_60_refresh_id1 }} - - match: { hits.total: 1 } 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 deleted file mode 100644 index 755aaca448b0b..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/create/71_nested_with_types.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -setup: - - do: - indices.create: - include_type_name: true - index: test_1 - body: - settings: - index.mapping.nested_objects.limit: 2 - mappings: - test_type: - properties: - nested1: - type: nested - ---- -"Indexing a doc with No. nested objects less or equal to index.mapping.nested_objects.limit should succeed": - - skip: - version: " - 6.99.99" - reason: index.mapping.nested_objects setting has been added in 7.0.0 - - do: - create: - index: test_1 - type: test_type - id: 1 - body: - "nested1" : [ { "foo": "bar" }, { "foo": "bar2" } ] - - match: { _version: 1} - ---- -"Indexing a doc with No. nested objects more than index.mapping.nested_objects.limit should fail": - - skip: - version: " - 6.99.99" - reason: index.mapping.nested_objects setting has been added in 7.0.0 - - do: - catch: /The number of nested documents has exceeded the allowed limit of \[2\]. This limit can be set by changing the \[index.mapping.nested_objects.limit\] index level setting\./ - create: - index: test_1 - type: test_type - id: 1 - body: - "nested1" : [ { "foo": "bar" }, { "foo": "bar2" }, { "foo": "bar3" } ] diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/13_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/13_basic_with_types.yml deleted file mode 100644 index a3671d5ac24b0..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/13_basic_with_types.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -"Basic": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - match: { _version: 1 } - - - do: - delete: - index: test_1 - type: test - id: 1 - - - match: { _version: 2 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/14_shard_header_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/14_shard_header_with_types.yml deleted file mode 100644 index d1bb4c0df347d..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/14_shard_header_with_types.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -"Delete check shard header": - - - do: - indices.create: - index: foobar - body: - settings: - number_of_shards: "1" - number_of_replicas: "0" - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: foobar - type: baz - id: 1 - body: { foo: bar } - - - do: - delete: - index: foobar - type: baz - id: 1 - - - match: { _index: foobar } - - match: { _type: baz } - - match: { _id: "1"} - - match: { _version: 2} - - match: { _shards.total: 1} - - match: { _shards.successful: 1} - - match: { _shards.failed: 0} - - is_false: _shards.pending diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/15_result_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/15_result_with_types.yml deleted file mode 100644 index d01e88be8ad0b..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/15_result_with_types.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -"Delete result field": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - delete: - index: test_1 - type: test - id: 1 - - - match: { result: deleted } - - - do: - catch: missing - delete: - index: test_1 - type: test - id: 1 - - - match: { result: not_found } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/21_cas_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/21_cas_with_types.yml deleted file mode 100644 index ef352a9bad6b1..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/21_cas_with_types.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -"Internal version": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - match: { _seq_no: 0 } - - - do: - catch: conflict - delete: - index: test_1 - type: test - id: 1 - if_seq_no: 2 - if_primary_term: 1 - - - do: - delete: - index: test_1 - type: test - id: 1 - if_seq_no: 0 - if_primary_term: 1 - - - match: { _seq_no: 1 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/27_external_version_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/27_external_version_with_types.yml deleted file mode 100644 index 453d64d85bbc1..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/27_external_version_with_types.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -"External version": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 5 - - - match: { _version: 5} - - - do: - catch: conflict - delete: - index: test_1 - type: test - id: 1 - version_type: external - version: 4 - - - do: - delete: - index: test_1 - type: test - id: 1 - version_type: external - version: 6 - - - match: { _version: 6} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/28_external_gte_version_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/28_external_gte_version_with_types.yml deleted file mode 100644 index 70f78c17faa63..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/28_external_gte_version_with_types.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -"External GTE version": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external_gte - version: 5 - - - match: { _version: 5} - - - do: - catch: conflict - delete: - index: test_1 - type: test - id: 1 - version_type: external_gte - version: 4 - - - do: - delete: - index: test_1 - type: test - id: 1 - version_type: external_gte - version: 6 - - - match: { _version: 6} - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external_gte - version: 6 - - - match: { _version: 6} - - - do: - delete: - index: test_1 - type: test - id: 1 - version_type: external_gte - version: 6 - - - match: { _version: 6} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/31_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/31_routing_with_types.yml deleted file mode 100644 index 6f67b3a03f401..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/31_routing_with_types.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - number_of_shards: 5 - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - catch: missing - delete: - index: test_1 - type: test - id: 1 - routing: 4 - - - do: - delete: - index: test_1 - type: test - id: 1 - routing: 5 - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/51_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/51_refresh_with_types.yml deleted file mode 100644 index a901c1033f7c0..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/51_refresh_with_types.yml +++ /dev/null @@ -1,148 +0,0 @@ ---- -"Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - refresh_interval: -1 - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - refresh: true - -# If you wonder why this document get 3 as an id instead of 2, it is because the -# current routing algorithm would route 1 and 2 to the same shard while we need -# them to be different for this test to pass - - do: - index: - index: test_1 - type: test - id: 3 - body: { foo: bar } - refresh: true - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { terms: { _id: [1,3] }} - - - match: { hits.total: 2 } - - - do: - delete: - index: test_1 - type: test - id: 1 - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { terms: { _id: [1,3] }} - - - match: { hits.total: 2 } - - - do: - delete: - index: test_1 - type: test - id: 3 - refresh: true - -# If a replica shard where doc 1 is located gets initialized at this point, doc 1 -# won't be found by the following search as the shard gets automatically refreshed -# right before getting started. This is why this test only works with 0 replicas. - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { terms: { _id: [1,3] }} - - - match: { hits.total: 1 } - ---- -"When refresh url parameter is an empty string that means \"refresh immediately\"": - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - refresh: true - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - match: { hits.total: 1 } - - - do: - delete: - index: test_1 - type: test - id: 1 - refresh: "" - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - match: { hits.total: 0 } - ---- -"refresh=wait_for waits until changes are visible in search": - - do: - index: - index: delete_50_refresh_1 - type: test - id: delete_50_refresh_id1 - body: { foo: bar } - refresh: true - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: delete_50_refresh_1 - body: - query: { term: { _id: delete_50_refresh_id1 }} - - match: { hits.total: 1 } - - - do: - delete: - index: delete_50_refresh_1 - type: test - id: delete_50_refresh_id1 - refresh: wait_for - - is_false: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: delete_50_refresh_1 - body: - query: { term: { _id: delete_50_refresh_id1 }} - - match: { hits.total: 0 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/61_missing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/delete/61_missing_with_types.yml deleted file mode 100644 index 9cfdb48ae20aa..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/61_missing_with_types.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -"Missing document with catch": - - - do: - catch: missing - delete: - index: test_1 - type: test - id: 1 - ---- -"Missing document with ignore": - - - do: - delete: - index: test_1 - type: test - id: 1 - ignore: 404 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 deleted file mode 100644 index e0f20795e41ca..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/delete/70_mix_typeless_typeful.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -"DELETE with typeless API on an index that has types": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "keyword" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - catch: bad_request - delete: - index: index - type: some_random_type - id: 1 - - - match: { error.root_cause.0.reason: "/Rejecting.mapping.update.to.\\[index\\].as.the.final.mapping.would.have.more.than.1.type.*/" } - - - do: - delete: - index: index - id: 1 - - - match: { _index: "index" } - - match: { _type: "_doc" } - - match: { _id: "1"} - - match: { _version: 2} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/exists/11_basic_with_types.yml deleted file mode 100644 index 7e4e26b6b1c1c..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/11_basic_with_types.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -"Basic": - - - do: - exists: - index: test_1 - type: test - id: 1 - - - is_false: '' - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar" } - - - is_true: '' - - - do: - exists: - index: test_1 - type: test - id: 1 - - - is_true: '' - - - do: - exists: - index: test_1 - type: test - id: 1 - version: 1 - - - is_true: '' diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/exists/41_routing_with_types.yml deleted file mode 100644 index 25315628d7ece..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/41_routing_with_types.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - exists: - index: test_1 - type: test - id: 1 - routing: 5 - - - is_true: '' - - - do: - exists: - index: test_1 - type: test - id: 1 - - - is_false: '' diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/61_realtime_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/exists/61_realtime_refresh_with_types.yml deleted file mode 100644 index df8c697e4a1fb..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/61_realtime_refresh_with_types.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -"Realtime Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - refresh_interval: -1 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - exists: - index: test_1 - type: test - id: 1 - realtime: false - - - is_false: '' - - - do: - exists: - index: test_1 - type: test - id: 1 - realtime: true - - - is_true: '' - - - do: - exists: - index: test_1 - type: test - id: 1 - realtime: false - refresh: true - - - is_true: '' diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/71_defaults_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/exists/71_defaults_with_types.yml deleted file mode 100644 index 2db28f6634bd6..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/exists/71_defaults_with_types.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -"Client-side default type": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar" } - - - do: - exists: - index: test_1 - type: _all - id: 1 - - - is_true: '' diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/11_basic_with_types.yml deleted file mode 100644 index 5f211435ae976..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/11_basic_with_types.yml +++ /dev/null @@ -1,66 +0,0 @@ -setup: - - do: - indices.create: - index: test_1 - body: - aliases: - alias_1: - "filter" : { "term" : { "foo" : "bar"} } - - - do: - index: - index: test_1 - type: test - id: id_1 - body: { foo: bar, title: howdy } - - - do: - indices.refresh: {} - ---- -"Basic explain": - - - do: - explain: - index: test_1 - type: test - id: id_1 - body: - query: - match_all: {} - - - is_true: matched - - match: { explanation.value: 1 } - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: id_1 } - ---- -"Basic explain with alias": - - - do: - explain: - index: alias_1 - type: test - id: id_1 - body: - query: - match_all: {} - - - is_true: matched - - match: { explanation.value: 1 } - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: id_1 } - ---- -"Explain body without query element": - - do: - catch: bad_request - explain: - index: test_1 - type: test - id: id_1 - body: - match_all: {} - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/21_source_filtering_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/explain/21_source_filtering_with_types.yml deleted file mode 100644 index e13edf7be5046..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/21_source_filtering_with_types.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -"Source filtering": - - do: - index: - index: test_1 - type: test - id: 1 - body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 } - - do: - indices.refresh: - index: test_1 - - - do: - explain: { index: test_1, type: test, id: 1, _source: false, body: { query: { match_all: {}} } } - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: "1" } - - is_false: get._source - - - do: - explain: { index: test_1, type: test, id: 1, _source: true, body: { query: { match_all: {}} } } - - match: { get._source.include.field1: v1 } - - - do: - explain: { index: test_1, type: test, id: 1, _source: include.field1, body: { query: { match_all: {}} } } - - match: { get._source.include.field1: v1 } - - is_false: get._source.include.field2 - - - do: - explain: { index: test_1, type: test, id: 1, _source_includes: include.field1, body: { query: { match_all: {}} } } - - match: { get._source.include.field1: v1 } - - is_false: get._source.include.field2 - - - do: - explain: { index: test_1, type: test, id: 1, _source_includes: "include.field1,include.field2", body: { query: { match_all: {}} } } - - match: { get._source.include.field1: v1 } - - match: { get._source.include.field2: v2 } - - is_false: get._source.count - - - do: - explain: { index: test_1, type: test, id: 1, _source_includes: include, _source_excludes: "*.field2", body: { query: { match_all: {}} } } - - match: { get._source.include.field1: v1 } - - is_false: get._source.include.field2 - - is_false: get._source.count 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 deleted file mode 100644 index b6930688acf2d..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/31_query_string_with_types.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -"explain with query_string parameters": - - do: - indices.create: - include_type_name: true - index: test - body: - mappings: - test: - properties: - number: - type: integer - - - do: - index: - index: test - type: test - id: 1 - body: { field: foo bar} - - - do: - indices.refresh: - index: [test] - - - do: - explain: - index: test - type: test - id: 1 - q: bar - df: field - - - is_true: matched - - - do: - explain: - index: test - type: test - id: 1 - q: field:foo field:xyz - - - is_true: matched - - - do: - explain: - index: test - type: test - id: 1 - q: field:foo field:xyz - default_operator: AND - - - is_false: matched - - - do: - explain: - index: test - type: test - id: 1 - q: field:BA* - - - is_true: matched - - - do: - explain: - index: test - type: test - id: 1 - q: number:foo - lenient: true - - - is_false: matched 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 deleted file mode 100644 index 36fdbaa6b6f78..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/explain/40_mix_typeless_typeful.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -"Explain with typeless API on an index that has types": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "keyword" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - indices.refresh: {} - - - do: - catch: missing - explain: - index: index - type: some_random_type - id: 1 - body: - query: - match_all: {} - - - match: { _index: "index" } - - match: { _type: "some_random_type" } - - match: { _id: "1"} - - match: { matched: false} - - - do: - explain: - index: index - type: _doc #todo: make _explain typeless and remove this - id: 1 - body: - query: - match_all: {} - - - match: { _index: "index" } - - match: { _type: "_doc" } - - match: { _id: "1"} - - is_true: matched - - match: { explanation.value: 1 } 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 deleted file mode 100644 index d13229dbffbc6..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -"GET with typeless API on an index that has types": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "keyword" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - catch: missing - get: - index: index - type: some_random_type - id: 1 - - - match: { _index: "index" } - - match: { _type: "some_random_type" } - - match: { _id: "1"} - - match: { found: false} - - - do: - get: - index: index - id: 1 - - - match: { _index: "index" } - - match: { _type: "_doc" } - - match: { _id: "1"} - - match: { _version: 1} - - match: { _source: { foo: bar }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/11_basic_with_types.yml deleted file mode 100644 index 0689f714d6416..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/11_basic_with_types.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -"Basic": - - - do: - index: - index: test_1 - type: test - id: 中文 - body: { "foo": "Hello: 中文" } - - - do: - get: - index: test_1 - type: test - id: 中文 - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: 中文 } - - match: { _source: { foo: "Hello: 中文" } } - - - do: - get: - index: test_1 - type: _all - id: 中文 - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: 中文 } - - match: { _source: { foo: "Hello: 中文" } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/16_default_values_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/16_default_values_with_types.yml deleted file mode 100644 index 5e08112253ef0..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/16_default_values_with_types.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -"Default values": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar" } - - - do: - get: - index: test_1 - type: _all - id: 1 - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: '1' } - - match: { _source: { foo: "bar" } } - 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 deleted file mode 100644 index d1862fc0340d8..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/21_stored_fields_with_types.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -"Stored fields": - - - do: - indices.create: - include_type_name: true - index: test_1 - body: - mappings: - test: - properties: - foo: - type: keyword - store: true - count: - type: integer - store: true - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar", "count": 1 } - - do: - get: - index: test_1 - type: test - id: 1 - stored_fields: foo - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: '1' } - - match: { fields.foo: [bar] } - - is_false: _source - - - do: - get: - index: test_1 - type: test - id: 1 - stored_fields: [foo, count] - - - match: { fields.foo: [bar] } - - match: { fields.count: [1] } - - is_false: _source - - - do: - get: - index: test_1 - type: test - id: 1 - stored_fields: [foo, count, _source] - - - match: { fields.foo: [bar] } - - match: { fields.count: [1] } - - match: { _source.foo: bar } - - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/41_routing_with_types.yml deleted file mode 100644 index 276346cda4f98..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/41_routing_with_types.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - get: - index: test_1 - type: test - id: 1 - routing: 5 - stored_fields: [_routing] - - - match: { _id: "1"} - - match: { _routing: "5"} - - - do: - catch: missing - get: - index: test_1 - type: test - id: 1 - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/51_with_headers_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/51_with_headers_with_types.yml deleted file mode 100644 index b88dbaafc4fb2..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/51_with_headers_with_types.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -"REST test with headers": - - skip: - features: ["headers", "yaml"] - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "body": "foo" } - - - do: - headers: - Accept: application/yaml - get: - index: test_1 - type: _all - id: 1 - - - match: {_index: "test_1"} - - match: {_type: "test"} - - match: {_id: "1"} - - match: {_version: 1} - - match: {found: true} - - match: { _source: { body: foo }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/61_realtime_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/61_realtime_refresh_with_types.yml deleted file mode 100644 index 7d02b4667efe7..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/61_realtime_refresh_with_types.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -"Realtime Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - refresh_interval: -1 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - catch: missing - get: - index: test_1 - type: test - id: 1 - realtime: false - - - do: - get: - index: test_1 - type: test - id: 1 - realtime: true - - - is_true: found - - - do: - get: - index: test_1 - type: test - id: 1 - realtime: false - refresh: true - - - is_true: found 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 deleted file mode 100644 index 3ac493c629f20..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/71_source_filtering_with_types.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -"Source filtering": - - - do: - indices.create: - include_type_name: true - index: test_1 - body: - mappings: - test: - properties: - count: - type: integer - store: true - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 } - - do: - get: { index: test_1, type: test, id: 1, _source: false } - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: "1" } - - is_false: _source - - - do: - get: { index: test_1, type: test, id: 1, _source: true } - - match: { _source.include.field1: v1 } - - - do: - get: { index: test_1, type: test, id: 1, _source: include.field1 } - - match: { _source.include.field1: v1 } - - is_false: _source.include.field2 - - - do: - get: { index: test_1, type: test, id: 1, _source_includes: include.field1 } - - match: { _source.include.field1: v1 } - - is_false: _source.include.field2 - - - do: - get: { index: test_1, type: test, id: 1, _source_includes: "include.field1,include.field2" } - - match: { _source.include.field1: v1 } - - match: { _source.include.field2: v2 } - - is_false: _source.count - - - do: - get: { index: test_1, type: test, id: 1, _source_includes: include, _source_excludes: "*.field2" } - - match: { _source.include.field1: v1 } - - is_false: _source.include.field2 - - is_false: _source.count - - - - do: - get: - index: test_1 - type: test - id: 1 - stored_fields: count - _source: true - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: "1" } - - match: { fields.count: [1] } - - match: { _source.include.field1: v1 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/81_missing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/81_missing_with_types.yml deleted file mode 100644 index a60d11388566d..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/81_missing_with_types.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -"Missing document with catch": - - - do: - catch: missing - get: - index: test_1 - type: test - id: 1 - ---- -"Missing document with ignore": - - - do: - get: - index: test_1 - type: test - id: 1 - ignore: 404 diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get/91_versions_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get/91_versions_with_types.yml deleted file mode 100644 index c6631b83b1867..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get/91_versions_with_types.yml +++ /dev/null @@ -1,89 +0,0 @@ ---- -"Versions": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - match: { _version: 1} - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - match: { _version: 2} - - - do: - get: - index: test_1 - type: test - id: 1 - version: 2 - - match: { _id: "1" } - - - do: - catch: conflict - get: - index: test_1 - type: test - id: 1 - version: 1 - - - do: - get: - index: test_1 - type: test - id: 1 - version: 2 - version_type: external - - match: { _id: "1" } - - - do: - catch: conflict - get: - index: test_1 - type: test - id: 1 - version: 10 - version_type: external - - - do: - catch: conflict - get: - index: test_1 - type: test - id: 1 - version: 1 - version_type: external - - - do: - get: - index: test_1 - type: test - id: 1 - version: 2 - version_type: external_gte - - match: { _id: "1" } - - - do: - catch: conflict - get: - index: test_1 - type: test - id: 1 - version: 10 - version_type: external_gte - - - do: - catch: conflict - get: - index: test_1 - type: test - id: 1 - version: 1 - version_type: external_gte - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/11_basic_with_types.yml deleted file mode 100644 index 1446f569e86d8..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/11_basic_with_types.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -"Basic with types": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar" } - - - do: - get_source: - index: test_1 - type: test - id: 1 - - - match: { '': { foo: bar } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/16_default_values_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/16_default_values_with_types.yml deleted file mode 100644 index e2de7a9f0007c..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/16_default_values_with_types.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -"Default values": - - do: - index: - index: test_1 - type: test - id: 1 - body: { "foo": "bar" } - - - do: - get_source: - index: test_1 - type: test - id: 1 - - - match: { '': { foo: bar } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/41_routing_with_types.yml deleted file mode 100644 index db53a33ba597e..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/41_routing_with_types.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -"Routing": - - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - get_source: - index: test_1 - type: test - id: 1 - routing: 5 - - - match: { '': {foo: bar}} - - - do: - catch: missing - get_source: - index: test_1 - type: test - id: 1 - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/61_realtime_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/61_realtime_refresh_with_types.yml deleted file mode 100644 index f5b406de28b4a..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/61_realtime_refresh_with_types.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -"Realtime": - - - do: - indices.create: - index: test_1 - body: - settings: - refresh_interval: -1 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - catch: missing - get_source: - index: test_1 - type: test - id: 1 - realtime: false - - - do: - get_source: - index: test_1 - type: test - id: 1 - realtime: true - - - match: { '': {foo: bar}} - - - do: - get_source: - index: test_1 - type: test - id: 1 - realtime: false - refresh: true - - - match: { '': {foo: bar}} - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/71_source_filtering_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/71_source_filtering_with_types.yml deleted file mode 100644 index b4f20fee53be2..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/71_source_filtering_with_types.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -"Source filtering": - - - - do: - index: - index: test_1 - type: test - id: 1 - body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 } - - - do: - get_source: { index: test_1, type: test, id: 1, _source_includes: include.field1 } - - match: { include.field1: v1 } - - is_false: include.field2 - - - do: - get_source: { index: test_1, type: test, id: 1, _source_includes: "include.field1,include.field2" } - - match: { include.field1: v1 } - - match: { include.field2: v2 } - - is_false: count - - - do: - get_source: { index: test_1, type: test, id: 1, _source_includes: include, _source_excludes: "*.field2" } - - match: { include.field1: v1 } - - is_false: include.field2 - - is_false: count diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/81_missing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/81_missing_with_types.yml deleted file mode 100644 index 16eb5ea51e898..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/81_missing_with_types.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -"Missing document with catch": - - - do: - catch: missing - get_source: - index: test_1 - type: test - id: 1 - ---- -"Missing document with ignore": - - - do: - get_source: - index: test_1 - type: test - id: 1 - ignore: 404 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 deleted file mode 100644 index d7cfced5164ec..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/get_source/86_source_missing_with_types.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -setup: - - - do: - indices.create: - include_type_name: true - index: test_1 - body: - mappings: - test: - _source: { enabled: false } - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - ---- -"Missing document source with catch": - - - do: - catch: missing - get_source: - index: test_1 - type: test - id: 1 - ---- -"Missing document source with ignore": - - - do: - get_source: - index: test_1 - type: test - id: 1 - ignore: 404 diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/11_with_id_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/11_with_id_with_types.yml deleted file mode 100644 index daac81849fb5e..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/11_with_id_with_types.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -"Index with ID": - - - do: - index: - index: test-weird-index-中文 - type: weird.type - id: 1 - body: { foo: bar } - - - match: { _index: test-weird-index-中文 } - - match: { _type: weird.type } - - match: { _id: "1"} - - match: { _version: 1} - - - do: - get: - index: test-weird-index-中文 - type: weird.type - id: 1 - - - match: { _index: test-weird-index-中文 } - - match: { _type: weird.type } - - match: { _id: "1"} - - match: { _version: 1} - - match: { _source: { foo: bar }} - - - do: - catch: bad_request - index: - index: idx - type: type - id: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - body: { foo: bar } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/13_result_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/13_result_with_types.yml deleted file mode 100644 index 45ebe0bbd3dc1..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/13_result_with_types.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -"Index result field": - - - do: - index: - index: test_index - type: test - id: 1 - body: { foo: bar } - - - match: { result: created } - - - do: - index: - index: test_index - type: test - id: 1 - body: { foo: bar } - op_type: index - - - match: { result: updated } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/16_without_id_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/16_without_id_with_types.yml deleted file mode 100644 index 3fff0512b9602..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/16_without_id_with_types.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -"Index without ID": - - - do: - index: - index: test_1 - type: test - body: { foo: bar } - - - is_true: _id - - match: { _index: test_1 } - - match: { _type: test } - - match: { _version: 1 } - - set: { _id: id } - - - do: - get: - index: test_1 - type: test - id: '$id' - - - match: { _index: test_1 } - - match: { _type: test } - - match: { _id: $id } - - match: { _version: 1 } - - match: { _source: { foo: bar }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/21_optype_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/21_optype_with_types.yml deleted file mode 100644 index 60ae26d46d07d..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/21_optype_with_types.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -"Optype": - - - do: - index: - index: test_1 - type: test - id: 1 - op_type: create - body: { foo: bar } - - - do: - catch: conflict - index: - index: test_1 - type: test - id: 1 - op_type: create - body: { foo: bar } - - - do: - index: - index: test_1 - type: test - id: 1 - op_type: index - body: { foo: bar } - - - match: { _version: 2 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/37_external_version_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/37_external_version_with_types.yml deleted file mode 100644 index f17e6b749319d..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/37_external_version_with_types.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -"External version": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 0 - - - match: { _version: 0 } - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 5 - - - match: { _version: 5 } - - - do: - catch: conflict - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 5 - - - do: - catch: conflict - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 0 - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external - version: 6 - - - match: { _version: 6} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/38_external_gte_version_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/38_external_gte_version_with_types.yml deleted file mode 100644 index dccbe02ea1400..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/38_external_gte_version_with_types.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -"External GTE version": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external_gte - version: 0 - - - match: { _version: 0} - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external_gte - version: 5 - - - match: { _version: 5} - - - do: - catch: conflict - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - version_type: external_gte - version: 0 - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar2 } - version_type: external_gte - version: 5 - - - match: { _version: 5} - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar2 } - version_type: external_gte - version: 6 - - - match: { _version: 6} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/41_routing_with_types.yml deleted file mode 100644 index 5b0cf94f4236b..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/41_routing_with_types.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - get: - index: test_1 - type: test - id: 1 - routing: 5 - stored_fields: [_routing] - - - match: { _id: "1"} - - match: { _routing: "5"} - - - do: - catch: missing - get: - index: test_1 - type: test - id: 1 - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/61_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/61_refresh_with_types.yml deleted file mode 100644 index be44cafd43020..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/61_refresh_with_types.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -"Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index.refresh_interval: -1 - number_of_replicas: 0 - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - - match: { hits.total: 0 } - - - do: - index: - index: test_1 - type: test - id: 2 - refresh: true - body: { foo: bar } - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 2 }} - - - match: { hits.total: 1 } - ---- -"When refresh url parameter is an empty string that means \"refresh immediately\"": - - do: - index: - index: test_1 - type: test - id: 1 - refresh: "" - body: { foo: bar } - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - - match: { hits.total: 1 } - ---- -"refresh=wait_for waits until changes are visible in search": - - do: - index: - index: index_60_refresh_1 - type: test - id: index_60_refresh_id1 - body: { foo: bar } - refresh: wait_for - - is_false: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: index_60_refresh_1 - body: - query: { term: { _id: index_60_refresh_id1 }} - - match: { hits.total: 1 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/11_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/11_basic_with_types.yml deleted file mode 100644 index f5aeb53751119..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/11_basic_with_types.yml +++ /dev/null @@ -1,143 +0,0 @@ ---- -"Create index with mappings": - - - do: - indices.create: - include_type_name: true - index: test_index - body: - mappings: - type_1: {} - - - do: - indices.get_mapping: - include_type_name: true - index: test_index - - - is_true: test_index.mappings.type_1 - ---- -"Create index with settings": - - - do: - indices.create: - include_type_name: true - index: test_index - body: - settings: - number_of_replicas: "0" - - - do: - indices.get_settings: - index: test_index - - - match: { test_index.settings.index.number_of_replicas: "0"} - ---- -"Create index": - - - do: - indices.create: - include_type_name: true - index: test_index - - - match: { acknowledged: true } - - match: { index: "test_index"} - ---- -"Create index with wait_for_active_shards set to all": - - - do: - indices.create: - include_type_name: true - index: test_index - wait_for_active_shards: all - body: - settings: - number_of_replicas: "0" - - - match: { acknowledged: true } - - match: { shards_acknowledged: true } - ---- -"Create index with aliases": - - - do: - indices.create: - include_type_name: true - index: test_index - body: - mappings: - type_1: - properties: - field: - type: text - aliases: - test_alias: {} - test_blias: - routing: b - test_clias: - filter: - term: - field : value - - - do: - indices.get_alias: - index: test_index - - - match: {test_index.aliases.test_blias.search_routing: b} - - match: {test_index.aliases.test_blias.index_routing: b} - - is_false: test_index.aliases.test_blias.filter - - match: {test_index.aliases.test_clias.filter.term.field: value} - - is_false: test_index.aliases.test_clias.index_routing - - is_false: test_index.aliases.test_clias.search_routing - ---- -"Create index with write aliases": - - skip: - version: " - 6.99.99" - reason: is_write_index is not implemented in ES <= 6.x - - do: - indices.create: - include_type_name: true - index: test_index - body: - aliases: - test_alias: {} - test_blias: - is_write_index: false - test_clias: - is_write_index: true - - - do: - indices.get_alias: - index: test_index - - - is_false: test_index.aliases.test_alias.is_write_index - - is_false: test_index.aliases.test_blias.is_write_index - - is_true: test_index.aliases.test_clias.is_write_index - ---- -"Create index with no type mappings": - - do: - catch: /illegal_argument_exception/ - indices.create: - include_type_name: true - index: test_index - body: - mappings: - "" : {} - ---- -"Create index with invalid mappings": - - do: - catch: /illegal_argument_exception/ - indices.create: - include_type_name: true - index: test_index - body: - mappings: - test_type: - properties: - "": - type: keyword 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 deleted file mode 100644 index 9167574ea9a8e..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.create/20_mix_typeless_typeful.yml +++ /dev/null @@ -1,149 +0,0 @@ ---- -"Create a typeless index while there is a typed template": - - - skip: - version: " - 6.6.99" - reason: Merging typeless/typed mappings/templates was added in 6.7 - features: allowed_warnings - - - do: - indices.put_template: - include_type_name: true - name: test_template - body: - index_patterns: test-* - mappings: - my_type: - properties: - foo: - type: keyword - - - do: - allowed_warnings: - - "index [test-1] matches multiple legacy templates [global, test_template], composable templates will only match a single template" - indices.create: - index: test-1 - body: - mappings: - properties: - bar: - type: "long" - - - do: - indices.get_mapping: - include_type_name: true - index: test-1 - - - is_true: test-1.mappings._doc # the index creation call won - - is_false: test-1.mappings.my_type - - is_true: test-1.mappings._doc.properties.foo - - is_true: test-1.mappings._doc.properties.bar - ---- -"Create a typed index while there is a typeless template": - - - skip: - version: " - 6.6.99" - reason: Merging typeless/typed mappings/templates was added in 6.7 - features: allowed_warnings - - - do: - indices.put_template: - include_type_name: false - name: test_template - body: - index_patterns: test-* - mappings: - properties: - foo: - type: keyword - - - do: - allowed_warnings: - - "index [test-1] matches multiple legacy templates [global, test_template], composable templates will only match a single template" - indices.create: - include_type_name: true - index: test-1 - body: - mappings: - my_type: - properties: - bar: - type: "long" - - - do: - indices.get_mapping: - include_type_name: true - index: test-1 - - - is_true: test-1.mappings.my_type # the index creation call won - - is_false: test-1.mappings._doc - - is_true: test-1.mappings.my_type.properties.foo - - is_true: test-1.mappings.my_type.properties.bar - ---- -"Implicitly create a typed index while there is a typeless template": - - - skip: - version: " - 6.99.99" - reason: include_type_name only supported as of 6.7 - - - do: - indices.put_template: - include_type_name: false - name: test_template - body: - index_patterns: test-* - mappings: - properties: - foo: - type: keyword - - - do: - catch: /the final mapping would have more than 1 type/ - index: - index: test-1 - type: my_type - body: { bar: 42 } - ---- -"Implicitly create a typeless index while there is a typed template": - - - skip: - version: " - 6.99.99" - reason: needs typeless index operations to work on typed indices - features: allowed_warnings - - - do: - indices.put_template: - include_type_name: true - name: test_template - body: - index_patterns: test-* - mappings: - my_type: - properties: - foo: - type: keyword - - - do: - allowed_warnings: - - "index [test-1] matches multiple legacy templates [global, test_template], composable templates will only match a single template" - index: - index: test-1 - body: { bar: 42 } - -# ensures dynamic mapping update is visible to get_mapping - - do: - cluster.health: - wait_for_events: normal - - - do: - indices.get_mapping: - include_type_name: true - index: test-1 - - - is_true: test-1.mappings.my_type # the template is honored - - is_false: test-1.mappings._doc - - is_true: test-1.mappings.my_type.properties.foo - - is_true: test-1.mappings.my_type.properties.bar diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml index 4ac82ec60e738..0fdb4d08543e4 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml @@ -20,7 +20,6 @@ - do: index: index: test - type: doc id: 1 body: { "message": "a long message to make a periodic flush happen after this index operation" } - do: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/10_basic.yml index 342adced0640d..dc68ffc9a3b86 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/10_basic.yml @@ -16,20 +16,17 @@ - do: index: index: logs-1 - type: test id: "1" body: { "foo": "hello world" } # make this doc visible in index stats refresh: true - + - do: get: index: logs_search - type: test id: "1" - match: { _index: logs-1 } - - match: { _type: test } - match: { _id: "1" } - match: { _source: { foo: "hello world" } } @@ -59,7 +56,6 @@ - do: index: index: logs-000002 - type: test id: "2" body: { "foo": "hello world" } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/20_max_doc_condition.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/20_max_doc_condition.yml index ec9fabe02595d..f5d223259dc06 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/20_max_doc_condition.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/20_max_doc_condition.yml @@ -17,7 +17,6 @@ - do: index: index: logs-1 - type: test id: "1" body: { "foo": "hello world" } refresh: true @@ -38,7 +37,6 @@ - do: index: index: logs-1 - type: test id: "2" body: { "foo": "hello world" } refresh: true diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/30_max_size_condition.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/30_max_size_condition.yml index 6e4df0f292915..c99f736a24979 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/30_max_size_condition.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/30_max_size_condition.yml @@ -18,7 +18,6 @@ - do: index: index: logs-1 - type: doc id: "1" body: { "foo": "hello world" } refresh: true diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/41_mapping_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/41_mapping_with_types.yml deleted file mode 100644 index 36389f3ce8bba..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.rollover/41_mapping_with_types.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -"Typeless mapping": - - skip: - version: " - 6.99.99" - reason: include_type_name defaults to true before 7.0.0 - - - do: - indices.create: - index: logs-1 - body: - aliases: - logs_search: {} - - # index first document and wait for refresh - - do: - index: - index: logs-1 - type: test - id: "1" - body: { "foo": "hello world" } - refresh: true - - # index second document and wait for refresh - - do: - index: - index: logs-1 - type: test - id: "2" - body: { "foo": "hello world" } - refresh: true - - # perform alias rollover with new typeless mapping - - do: - indices.rollover: - include_type_name: true - alias: "logs_search" - body: - conditions: - max_docs: 2 - mappings: - _doc: - properties: - foo2: - type: keyword - - - match: { conditions: { "[max_docs: 2]": true } } - - match: { rolled_over: true } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.segments/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.segments/10_basic.yml index 37602774474a1..bda7788354b47 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.segments/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.segments/10_basic.yml @@ -25,7 +25,6 @@ - do: index: index: index1 - type: type body: { foo: bar } refresh: true @@ -53,7 +52,6 @@ - do: index: index: index1 - type: type body: { foo: bar } refresh: true diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shard_stores/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shard_stores/10_basic.yml index b6f1c7e552790..1f621c2e50b9d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shard_stores/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.shard_stores/10_basic.yml @@ -24,7 +24,6 @@ - do: index: index: index1 - type: type body: { foo: bar } refresh: true @@ -59,13 +58,11 @@ - do: index: index: index1 - type: type body: { foo: bar } refresh: true - do: index: index: index2 - type: type body: { foo: bar } refresh: true - do: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/15_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/15_types.yml deleted file mode 100644 index e2f31c3405707..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats/15_types.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -setup: - - - do: - index: - index: test1 - type: bar - id: 1 - body: { "bar": "bar", "baz": "baz" } - - - do: - index: - index: test2 - type: baz - id: 1 - body: { "bar": "bar", "baz": "baz" } - - ---- -"Types - blank": - - do: - indices.stats: {} - - - match: { _all.primaries.indexing.index_total: 2 } - - is_false: _all.primaries.indexing.types - ---- -"Types - one": - - do: - indices.stats: { types: bar } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - is_false: _all.primaries.indexing.types.baz - ---- -"Types - multi": - - do: - indices.stats: { types: "bar,baz" } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - match: { _all.primaries.indexing.types.baz.index_total: 1 } - ---- -"Types - star": - - do: - indices.stats: { types: "*" } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - match: { _all.primaries.indexing.types.baz.index_total: 1 } - ---- -"Types - pattern": - - do: - indices.stats: { types: "*r" } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - is_false: _all.primaries.indexing.types.baz - ---- -"Types - _all metric": - - do: - indices.stats: { types: bar, metric: _all } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - is_false: _all.primaries.indexing.types.baz - ---- -"Types - indexing metric": - - do: - indices.stats: { types: bar, metric: indexing } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - is_false: _all.primaries.indexing.types.baz - ---- -"Types - multi metric": - - do: - indices.stats: { types: bar, metric: [ indexing, search ] } - - - match: { _all.primaries.indexing.types.bar.index_total: 1 } - - is_false: _all.primaries.indexing.types.baz diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/11_default_index_type.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/11_default_index_type.yml deleted file mode 100644 index 773b7e3bcfe6b..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/11_default_index_type.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -"Default index/type": - - do: - indices.create: - index: test_2 - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - mget: - index: test_1 - type: test - body: - docs: - - { _index: test_2, _id: 1} - - { _type: none, _id: 1} - - { _id: 2} - - { _id: 1} - - - is_false: docs.0.found - - match: { docs.0._index: test_2 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - - is_false: docs.1.found - - match: { docs.1._index: test_1 } - - match: { docs.1._type: none } - - match: { docs.1._id: "1" } - - - is_false: docs.2.found - - match: { docs.2._index: test_1 } - - match: { docs.2._type: test } - - match: { docs.2._id: "2" } - - - is_true: docs.3.found - - match: { docs.3._index: test_1 } - - match: { docs.3._type: test } - - match: { docs.3._id: "1" } - - match: { docs.3._version: 1 } - - match: { docs.3._source: { foo: bar }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/16_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/16_basic_with_types.yml deleted file mode 100644 index 0850772ad426c..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/16_basic_with_types.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -"Basic multi-get": - - do: - indices.create: - index: test_2 - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - indices.refresh: {} - - - do: - mget: - body: - docs: - - { _index: test_2, _type: test, _id: 1} - - { _index: test_1, _type: none, _id: 1} - - { _index: test_1, _type: test, _id: 2} - - { _index: test_1, _type: test, _id: 1} - - - is_false: docs.0.found - - match: { docs.0._index: test_2 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - - is_false: docs.1.found - - match: { docs.1._index: test_1 } - - match: { docs.1._type: none } - - match: { docs.1._id: "1" } - - - is_false: docs.2.found - - match: { docs.2._index: test_1 } - - match: { docs.2._type: test } - - match: { docs.2._id: "2" } - - - is_true: docs.3.found - - match: { docs.3._index: test_1 } - - match: { docs.3._type: test } - - match: { docs.3._id: "1" } - - match: { docs.3._version: 1 } - - match: { docs.3._source: { foo: bar }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/18_non_existent_index_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/18_non_existent_index_with_types.yml deleted file mode 100644 index 0623464225072..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/18_non_existent_index_with_types.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -"Non-existent index": - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - mget: - body: - docs: - - { _index: test_2, _type: test, _id: 1} - - - is_false: docs.0.found - - match: { docs.0._index: test_2 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - - do: - mget: - body: - docs: - - { _index: test_1, _type: test, _id: 1} - - - is_true: docs.0.found - - match: { docs.0._index: test_1 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/19_missing_metadata_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/19_missing_metadata_with_types.yml deleted file mode 100644 index d7af1797f7a40..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/19_missing_metadata_with_types.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -"Missing metadata": - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - catch: /action_request_validation_exception.+ id is missing/ - mget: - body: - docs: - - { _index: test_1, _type: test} - - - do: - catch: /action_request_validation_exception.+ index is missing/ - mget: - body: - docs: - - { _type: test, _id: 1} - - - do: - catch: /action_request_validation_exception.+ no documents to get/ - mget: - body: - docs: [] - - - do: - catch: /action_request_validation_exception.+ no documents to get/ - mget: - body: {} - - - do: - mget: - body: - docs: - - { _index: test_1, _id: 1} - - - is_true: docs.0.found - - match: { docs.0._index: test_1 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - match: { docs.0._version: 1 } - - match: { docs.0._source: { foo: bar }} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/21_alias_to_multiple_indices_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/21_alias_to_multiple_indices_with_types.yml deleted file mode 100644 index 8b8ff6cbdb76c..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/21_alias_to_multiple_indices_with_types.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -"Multi Get with alias that resolves to multiple indices": - - skip: - version: " - 7.8.99" - reason: "message was changed to fix grammar in 7.9" - - - do: - bulk: - refresh: true - body: | - {"index": {"_index": "test_1", "_type": "test", "_id": 1}} - { "foo": "bar" } - {"index": {"_index": "test_2", "_type": "test", "_id": 2}} - { "foo": "bar" } - {"index": {"_index": "test_3", "_type": "test", "_id": 3}} - { "foo": "bar" } - - - do: - indices.put_alias: - index: test_2 - name: test_two_and_three - - - do: - indices.put_alias: - index: test_3 - name: test_two_and_three - - - do: - mget: - body: - docs: - - { _index: test_1, _type: test, _id: 1} - - { _index: test_two_and_three, _type: test, _id: 2} - - - is_true: docs.0.found - - match: { docs.0._index: test_1 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - - is_false: docs.1.found - - match: { docs.1._index: test_two_and_three } - - match: { docs.1._type: test } - - match: { docs.1._id: "2" } - - match: { docs.1.error.root_cause.0.type: "illegal_argument_exception" } - - match: { docs.1.error.root_cause.0.reason: "/[aA]lias.\\[test_two_and_three\\].has.more.than.one.index.associated.with.it.\\[test_[23]{1},.test_[23]{1}\\],.can't.execute.a.single.index.op/" } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/22_ids_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/22_ids_with_types.yml deleted file mode 100644 index 6c233e4d92a9c..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/22_ids_with_types.yml +++ /dev/null @@ -1,72 +0,0 @@ ---- -"IDs": - - do: - indices.create: - index: test_1 - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - index: - index: test_1 - type: test - id: 2 - body: { foo: baz } - - - do: - mget: - index: test_1 - type: test - body: - ids: [1, 3] - - - is_true: docs.0.found - - match: { docs.0._index: test_1 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - match: { docs.0._version: 1 } - - match: { docs.0._source: { foo: bar }} - - - is_false: docs.1.found - - match: { docs.1._index: test_1 } - - match: { docs.1._type: test } - - match: { docs.1._id: "3" } - - - do: - mget: - index: test_1 - body: - ids: [1, 2] - - - is_true: docs.0.found - - match: { docs.0._index: test_1 } - - match: { docs.0._type: test } - - match: { docs.0._id: "1" } - - match: { docs.0._version: 1 } - - match: { docs.0._source: { foo: bar }} - - - is_true: docs.1.found - - match: { docs.1._index: test_1 } - - match: { docs.1._type: test } - - match: { docs.1._id: "2" } - - match: { docs.1._version: 1 } - - match: { docs.1._source: { foo: baz }} - - - - do: - catch: /action_request_validation_exception.+ no documents to get/ - mget: - index: test_1 - body: - ids: [] - - - do: - catch: /action_request_validation_exception.+ no documents to get/ - mget: - index: test_1 - body: {} 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 deleted file mode 100644 index 05b9738d46180..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/23_stored_fields_with_types.yml +++ /dev/null @@ -1,120 +0,0 @@ ---- -"Stored fields": - - - do: - indices.create: - include_type_name: true - index: test_1 - body: - mappings: - test: - properties: - foo: - type: keyword - store: true - count: - type: integer - store: true - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - mget: - index: test_1 - type: test - body: - docs: - - { _id: 1 } - - { _id: 1, stored_fields: foo } - - { _id: 1, stored_fields: [foo] } - - { _id: 1, stored_fields: [foo, _source] } - - - is_false: docs.0.fields - - match: { docs.0._source: { foo: bar }} - - - match: { docs.1.fields.foo: [bar] } - - is_false: docs.1._source - - - match: { docs.2.fields.foo: [bar] } - - is_false: docs.2._source - - - match: { docs.3.fields.foo: [bar] } - - match: { docs.3._source: { foo: bar }} - - - do: - mget: - index: test_1 - type: test - stored_fields: foo - body: - docs: - - { _id: 1 } - - { _id: 1, stored_fields: foo } - - { _id: 1, stored_fields: [foo] } - - { _id: 1, stored_fields: [foo, _source] } - - - match: { docs.0.fields.foo: [bar] } - - is_false: docs.0._source - - - match: { docs.1.fields.foo: [bar] } - - is_false: docs.1._source - - - match: { docs.2.fields.foo: [bar] } - - is_false: docs.2._source - - - match: { docs.3.fields.foo: [bar] } - - match: { docs.3._source: { foo: bar }} - - - do: - mget: - index: test_1 - type: test - stored_fields: [foo] - body: - docs: - - { _id: 1 } - - { _id: 1, stored_fields: foo } - - { _id: 1, stored_fields: [foo] } - - { _id: 1, stored_fields: [foo, _source] } - - - match: { docs.0.fields.foo: [bar] } - - is_false: docs.0._source - - - match: { docs.1.fields.foo: [bar] } - - is_false: docs.1._source - - - match: { docs.2.fields.foo: [bar] } - - is_false: docs.2._source - - - match: { docs.3.fields.foo: [bar] } - - match: { docs.3._source: { foo: bar }} - - - do: - mget: - index: test_1 - type: test - stored_fields: [foo, _source] - body: - docs: - - { _id: 1 } - - { _id: 1, stored_fields: foo } - - { _id: 1, stored_fields: [foo] } - - { _id: 1, stored_fields: [foo, _source] } - - - match: { docs.0.fields.foo: [bar] } - - match: { docs.0._source: { foo: bar }} - - - match: { docs.1.fields.foo: [bar] } - - is_false: docs.1._source - - - match: { docs.2.fields.foo: [bar] } - - is_false: docs.2._source - - - match: { docs.3.fields.foo: [bar] } - - match: { docs.3._source: { foo: bar }} - diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/41_routing_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/41_routing_with_types.yml deleted file mode 100644 index d550dd26657c9..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/41_routing_with_types.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -"Routing": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - number_of_shards: 5 - number_of_routing_shards: 5 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - routing: 5 - body: { foo: bar } - - - do: - mget: - index: test_1 - type: test - stored_fields: [_routing] - body: - docs: - - { _id: 1 } - - { _id: 1, routing: 4 } - - { _id: 1, routing: 5 } - - - is_false: docs.0.found - - is_false: docs.1.found - - - is_true: docs.2.found - - match: { docs.2._index: test_1 } - - match: { docs.2._type: test } - - match: { docs.2._id: "1" } - - match: { docs.2._routing: "5" } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/61_realtime_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/61_realtime_refresh_with_types.yml deleted file mode 100644 index 0cb7b71cf4368..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/61_realtime_refresh_with_types.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -"Realtime Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - refresh_interval: -1 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - mget: - index: test_1 - type: test - realtime: false - body: - ids: [1] - - - is_false: docs.0.found - - - do: - mget: - index: test_1 - type: test - realtime: true - body: - ids: [1] - - - is_true: docs.0.found - - - do: - mget: - index: test_1 - type: test - realtime: false - refresh: true - body: - ids: [1] - - - is_true: docs.0.found diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/71_source_filtering_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/71_source_filtering_with_types.yml deleted file mode 100644 index 4581e060b41a7..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/71_source_filtering_with_types.yml +++ /dev/null @@ -1,119 +0,0 @@ -setup: - - do: - index: - index: test_1 - type: test - id: 1 - body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 } - - do: - index: - index: test_1 - type: test - id: 2 - body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 } - ---- -"Source filtering - true/false": - - - do: - mget: - body: - docs: - - { _index: "test_1", _type: "test", _id: "1", _source: false } - - { _index: "test_1", _type: "test", _id: "2", _source: true } - - - match: { docs.0._id: "1" } - - is_false: docs.0._source - - match: { docs.1._id: "2" } - - is_true: docs.1._source - ---- -"Source filtering - include field": - - - do: - mget: - body: - docs: - - { _index: "test_1", _type: "test", _id: "1", _source: include.field1 } - - { _index: "test_1", _type: "test", _id: "2", _source: [ include.field1 ] } - - - match: { docs.0._source: { include: { field1: v1 }} } - - match: { docs.1._source: { include: { field1: v1 }} } - - ---- -"Source filtering - include nested field": - - - do: - mget: - body: - docs: - - { _index: "test_1", _type: "test", _id: "1", _source: { include: include.field1 } } - - { _index: "test_1", _type: "test", _id: "2", _source: { include: [ include.field1 ] } } - - - match: { docs.0._source: { include: { field1: v1 }} } - - match: { docs.1._source: { include: { field1: v1 }} } - ---- -"Source filtering - exclude field": - - - do: - mget: - body: - docs: - - { _index: "test_1", _type: "test", _id: "1", _source: { include: [ include ], exclude: [ "*.field2" ] } } - - - match: { docs.0._source: { include: { field1: v1 }} } - ---- -"Source filtering - ids and true/false": - - - do: - mget: - _source: false - index: test_1 - body: { ids: [ 1,2 ] } - - is_false: docs.0._source - - is_false: docs.1._source - - - do: - mget: - _source: true - index: test_1 - body: { ids: [ 1,2 ] } - - is_true: docs.0._source - - is_true: docs.1._source - ---- -"Source filtering - ids and include field": - - - do: - mget: - _source: include.field1 - index: test_1 - body: { ids: [ 1,2 ] } - - match: { docs.0._source: { include: { field1: v1 }} } - - match: { docs.1._source: { include: { field1: v1 }} } - ---- -"Source filtering - ids and include nested field": - - - do: - mget: - _source_includes: "include.field1,count" - index: test_1 - body: { ids: [ 1,2 ] } - - match: { docs.0._source: { include: { field1: v1 }, count: 1} } - - match: { docs.1._source: { include: { field1: v1 }, count: 1} } - ---- -"Source filtering - ids and exclude field": - - - do: - mget: - _source_includes: include - _source_excludes: "*.field2" - index: test_1 - body: { ids: [ 1,2 ] } - - match: { docs.0._source: { include: { field1: v1 } } } - - match: { docs.1._source: { include: { field1: v1 } } } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/80_deprecated_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/mget/80_deprecated_with_types.yml deleted file mode 100644 index 5033f75c79426..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mget/80_deprecated_with_types.yml +++ /dev/null @@ -1,38 +0,0 @@ - ---- -"Deprecated parameters should fail in Multi Get query": - - - skip: - version: " - 6.99.99" - reason: _version, _routing are removed starting from 7.0, their equivalents without underscore are used instead - features: "warnings" - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - index: - index: test_1 - type: test - id: 2 - body: { foo: baz } - - - do: - catch: bad_request - mget: - body: - docs: - - { _index: test_1, _type: test, _id: 1, _routing : test1 } - - { _index: test_1, _type: test, _id: 2, _routing : test1 } - - - do: - catch: bad_request - mget: - body: - docs: - - { _index: test_1, _type: test, _id: 1, _version : 1 } - - { _index: test_1, _type: test, _id: 2, _version : 1 } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/12_basic_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/12_basic_with_types.yml deleted file mode 100644 index 64e88de404ab7..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/msearch/12_basic_with_types.yml +++ /dev/null @@ -1,97 +0,0 @@ ---- -setup: - - - do: - index: - index: index_1 - type: test - id: 1 - body: { foo: bar } - - - do: - index: - index: index_1 - type: test - id: 2 - body: { foo: baz } - - - do: - index: - index: index_1 - type: test - id: 3 - body: { foo: foo } - - - do: - index: - index: index_2 - type: test - id: 1 - body: { foo: foo } - - - do: - indices.refresh: {} - ---- -"Basic multi-search": - - - do: - msearch: - rest_total_hits_as_int: true - body: - - index: index_* - - query: - match: {foo: foo} - - index: index_2 - - query: - match_all: {} - - index: index_1 - - query: - match: {foo: foo} - - index: index_3 - - query: - match_all: {} - - type: test - - query: - match_all: {} - - - match: { responses.0.hits.total: 2 } - - match: { responses.1.hits.total: 1 } - - match: { responses.2.hits.total: 1 } - - match: { responses.3.error.root_cause.0.type: index_not_found_exception } - - match: { responses.3.error.root_cause.0.reason: "/no.such.index/" } - - match: { responses.3.error.root_cause.0.index: index_3 } - - match: { responses.4.hits.total: 4 } - ---- -"Least impact smoke test": -# only passing these parameters to make sure they are consumed - - do: - msearch: - rest_total_hits_as_int: true - max_concurrent_shard_requests: 1 - max_concurrent_searches: 1 - body: - - index: index_* - - query: - match: {foo: foo} - - index: index_2 - - query: - match_all: {} - - index: index_1 - - query: - match: {foo: foo} - - index: index_3 - - query: - match_all: {} - - type: test - - query: - match_all: {} - - - match: { responses.0.hits.total: 2 } - - match: { responses.1.hits.total: 1 } - - match: { responses.2.hits.total: 1 } - - match: { responses.3.error.root_cause.0.type: index_not_found_exception } - - match: { responses.3.error.root_cause.0.reason: "/no.such.index/" } - - match: { responses.3.error.root_cause.0.index: index_3 } - - match: { responses.4.hits.total: 4 } 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 deleted file mode 100644 index 0c037eee9ddd2..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/11_basic_with_types.yml +++ /dev/null @@ -1,86 +0,0 @@ -setup: - - do: - indices.create: - include_type_name: true - index: testidx - body: - mappings: - testtype: - properties: - text: - type : "text" - term_vector : "with_positions_offsets" - - do: - index: - index: testidx - type: testtype - id: testing_document - body: {"text" : "The quick brown fox is brown."} - - - do: - indices.refresh: {} - ---- -"Basic tests for multi termvector get": - - - do: - mtermvectors: - "term_statistics" : true - "body" : - "docs": - - - "_index" : "testidx" - "_type" : "testtype" - "_id" : "testing_document" - - - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2} - - match: {docs.0.term_vectors.text.terms.brown.ttf: 2} - - - do: - mtermvectors: - "term_statistics" : true - "body" : - "docs": - - - "_index" : "testidx" - "_type" : "testtype" - "_id" : "testing_document" - - - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2} - - match: {docs.0.term_vectors.text.terms.brown.ttf: 2} - - - do: - mtermvectors: - "term_statistics" : true - "index" : "testidx" - "body" : - "docs": - - - "_type" : "testtype" - "_id" : "testing_document" - - - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2} - - match: {docs.0.term_vectors.text.terms.brown.ttf: 2} - - - do: - mtermvectors: - "term_statistics" : true - "index" : "testidx" - "type" : "testtype" - "body" : - "docs": - - - "_id" : "testing_document" - - - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2} - - match: {docs.0.term_vectors.text.terms.brown.ttf: 2} - - - do: - mtermvectors: - "term_statistics" : true - "index" : "testidx" - "type" : "testtype" - "ids" : ["testing_document"] - - - match: {docs.0.term_vectors.text.terms.brown.term_freq: 2} - - match: {docs.0.term_vectors.text.terms.brown.ttf: 2} 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 deleted file mode 100644 index b0335498e22a1..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/mtermvectors/21_deprecated_with_types.yml +++ /dev/null @@ -1,53 +0,0 @@ - ---- -"Deprecated camel case and _ parameters should fail in Term Vectors query": - - - skip: - version: " - 6.99.99" - reason: camel case and _ parameters (e.g. versionType, _version_type) should fail from 7.0 - features: "warnings" - - - do: - indices.create: - include_type_name: true - index: testidx - body: - mappings: - testtype: - properties: - text: - type : "text" - term_vector : "with_positions_offsets" - - - do: - index: - index: testidx - type: testtype - id: testing_document - body: {"text" : "The quick brown fox is brown."} - - - do: - catch: bad_request - mtermvectors: - "term_statistics" : true - "body" : - "docs": - - - "_index" : "testidx" - "_type" : "testtype" - "_id" : "testing_document" - "version" : 1 - "versionType" : "external" - - - do: - catch: bad_request - mtermvectors: - "term_statistics" : true - "body" : - "docs": - - - "_index" : "testidx" - "_type" : "testtype" - "_id" : "testing_document" - "version" : 1 - "_version_type" : "external" diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/51_filter_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/51_filter_with_types.yml deleted file mode 100644 index 54476ce6e65b1..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/51_filter_with_types.yml +++ /dev/null @@ -1,60 +0,0 @@ -setup: - - do: - indices.create: - include_type_name: true - index: test - body: - settings: - number_of_shards: 1 - number_of_replicas: 0 - mappings: - test: - properties: - mentions: - type: keyword - notifications: - type: keyword - - - do: - index: - index: test - type: test - id: foo|bar|baz0 - body: { "notifications" : ["abc"] } - - - do: - index: - index: test - type: test - id: foo|bar|baz1 - body: { "mentions" : ["abc"] } - - - do: - indices.refresh: {} - ---- -"Filter aggs with terms lookup and ensure it's cached": - # Because the filter agg rewrites the terms lookup in the rewrite phase the request can be cached - - skip: - features: allowed_warnings - - do: - allowed_warnings: - - "Deprecated field [type] used, this field is unused and will be removed entirely" - search: - rest_total_hits_as_int: true - size: 0 - request_cache: true - body: {"aggs": { "itemsNotify": { "filter": { "terms": { "mentions": { "index": "test", "type": "test", "id": "foo|bar|baz0", "path": "notifications"}}}, "aggs": { "mentions" : {"terms" : { "field" : "mentions" }}}}}} - - # validate result - - match: { hits.total: 2 } - - match: { aggregations.itemsNotify.doc_count: 1 } - - length: { aggregations.itemsNotify.mentions.buckets: 1 } - - match: { aggregations.itemsNotify.mentions.buckets.0.key: "abc" } - # we are using a lookup - this should not cache - - do: - indices.stats: { index: test, metric: request_cache} - - match: { _shards.total: 1 } - - match: { _all.total.request_cache.hit_count: 0 } - - match: { _all.total.request_cache.miss_count: 1 } - - is_true: indices.test 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 deleted file mode 100644 index 992d6db7ca786..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/11_basic_with_types.yml +++ /dev/null @@ -1,36 +0,0 @@ -setup: - - do: - indices.create: - include_type_name: true - index: testidx - body: - mappings: - testtype: - "properties": - "text": - "type" : "text" - "term_vector" : "with_positions_offsets" - - do: - index: - index: testidx - type: testtype - id: testing_document - body: - "text" : "The quick brown fox is brown." - - do: - indices.refresh: {} - ---- -"Basic tests for termvector get": - - - do: - termvectors: - index: testidx - type: testtype - id: testing_document - "term_statistics" : true - - - - match: {term_vectors.text.field_statistics.sum_doc_freq: 5} - - match: {term_vectors.text.terms.brown.doc_freq: 1} - - match: {term_vectors.text.terms.brown.tokens.0.start_offset: 10} 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 deleted file mode 100644 index cf597bf141f61..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/21_issue7121_with_types.yml +++ /dev/null @@ -1,42 +0,0 @@ -"Term vector API should return 'found: false' for docs between index and refresh": - - do: - indices.create: - include_type_name: true - index: testidx - body: - settings: - index: - translog.flush_threshold_size: "512MB" - number_of_shards: 1 - number_of_replicas: 0 - refresh_interval: -1 - mappings: - doc: - properties: - text: - type : "text" - term_vector : "with_positions_offsets" - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: testidx - type: doc - id: 1 - body: - text : "foo bar" - - - do: - termvectors: - index: testidx - type: doc - id: 1 - realtime: false - - - match: { _index: "testidx" } - - match: { _type: "doc" } - - match: { _id: "1" } - - is_false: found diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/31_realtime_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/31_realtime_with_types.yml deleted file mode 100644 index 26f441207ace8..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/31_realtime_with_types.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -"Realtime Term Vectors": - - - do: - indices.create: - index: test_1 - body: - settings: - index: - refresh_interval: -1 - number_of_replicas: 0 - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: test_1 - type: test - id: 1 - body: { foo: bar } - - - do: - termvectors: - index: test_1 - type: test - id: 1 - realtime: false - - - is_false: found - - - do: - termvectors: - index: test_1 - type: test - id: 1 - realtime: true - - - is_true: found 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 deleted file mode 100644 index 4382442dee4dd..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/termvectors/50_mix_typeless_typeful.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -"Term vectors with typeless API on an index that has types": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "text" - term_vector: "with_positions" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - indices.refresh: {} - - - do: - termvectors: - index: index - type: _doc # todo: remove when termvectors support typeless API - id: 1 - - - is_true: found - - match: {_type: _doc} - - match: {term_vectors.foo.terms.bar.term_freq: 1} - - - do: - termvectors: - index: index - type: some_random_type - id: 1 - - - is_false: found diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/14_shard_header_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/14_shard_header_with_types.yml deleted file mode 100644 index eb2e4ff9a9117..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/14_shard_header_with_types.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -"Update check shard header": - - - do: - indices.create: - index: foobar - body: - settings: - number_of_shards: "1" - number_of_replicas: "0" - - - do: - cluster.health: - wait_for_status: green - - - do: - index: - index: foobar - type: baz - id: 1 - body: { foo: bar } - - - do: - update: - index: foobar - type: baz - id: 1 - body: - doc: - foo: baz - - - match: { _index: foobar } - - match: { _type: baz } - - match: { _id: "1"} - - match: { _version: 2} - - match: { _shards.total: 1} - - match: { _shards.successful: 1} - - match: { _shards.failed: 0} - - is_false: _shards.pending diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/16_noop.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/16_noop.yml index bfb56541fb7eb..dfdf2a10c84fc 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/16_noop.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/update/16_noop.yml @@ -6,7 +6,6 @@ - do: index: index: test_1 - type: test id: 1 body: { foo: bar } @@ -18,7 +17,6 @@ - do: update: index: test_1 - type: test id: 1 body: doc: { foo: bar } @@ -31,7 +29,6 @@ - do: update: index: test_1 - type: test id: 1 body: doc: { foo: bar } diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/update/61_refresh_with_types.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/update/61_refresh_with_types.yml deleted file mode 100644 index be2d9f9f7969e..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/61_refresh_with_types.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -"Refresh": - - - do: - indices.create: - index: test_1 - body: - settings: - index.refresh_interval: -1 - number_of_replicas: 0 - - - do: - update: - index: test_1 - type: test - id: 1 - body: - doc: { foo: baz } - upsert: { foo: bar } - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 1 }} - - - match: { hits.total: 0 } - - - do: - update: - index: test_1 - type: test - id: 2 - refresh: true - body: - doc: { foo: baz } - upsert: { foo: bar } - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { _id: 2 }} - - - match: { hits.total: 1 } - ---- -"When refresh url parameter is an empty string that means \"refresh immediately\"": - - do: - index: - index: test_1 - type: test - id: 1 - refresh: true - body: { foo: bar } - - is_true: forced_refresh - - - do: - update: - index: test_1 - type: test - id: 1 - refresh: "" - body: - doc: {cat: dog} - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: test_1 - body: - query: { term: { cat: dog }} - - - match: { hits.total: 1 } - ---- -"refresh=wait_for waits until changes are visible in search": - - do: - index: - index: update_60_refresh_1 - type: test - id: update_60_refresh_id1 - body: { foo: bar } - refresh: true - - is_true: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: update_60_refresh_1 - body: - query: { term: { _id: update_60_refresh_id1 }} - - match: { hits.total: 1 } - - - do: - update: - index: update_60_refresh_1 - type: test - id: update_60_refresh_id1 - refresh: wait_for - body: - doc: { test: asdf } - - is_false: forced_refresh - - - do: - search: - rest_total_hits_as_int: true - index: update_60_refresh_1 - body: - query: { match: { test: asdf } } - - match: { hits.total: 1 } 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 deleted file mode 100644 index 0ca25e8598c24..0000000000000 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/update/90_mix_typeless_typeful.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -"Update with typeless API on an index that has types": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "keyword" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - update: - index: index - id: 1 - body: - doc: - foo: baz - - - do: - get: - index: index - type: not_doc - id: 1 - - - match: { _source.foo: baz } - ---- -"Update call that introduces new field mappings": - - - skip: - version: " - 6.99.99" - reason: Typeless APIs were introduced in 7.0.0 - - - do: - indices.create: # not using include_type_name: false on purpose - include_type_name: true - index: index - body: - mappings: - not_doc: - properties: - foo: - type: "keyword" - - - do: - index: - index: index - type: not_doc - id: 1 - body: { foo: bar } - - - do: - update: - index: index - id: 1 - body: - doc: - foo: baz - new_field: value - - do: - get: # using typeful API on purpose - index: index - type: not_doc - id: 1 - - - match: { _index: "index" } - - match: { _type: "not_doc" } - - match: { _id: "1" } - - match: { _version: 2} - - match: { _source.foo: baz } - - match: { _source.new_field: value }