diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java index e4ac2d6608d..57bc24edf99 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java @@ -2037,7 +2037,7 @@ public class IndicesClientIT extends ESRestHighLevelClientTestCase { CompressedXContent mappings = new CompressedXContent("{\"properties\":{\"@timestamp\":{\"type\":\"date\"}}}"); Template template = new Template(null, mappings, null); ComposableIndexTemplate indexTemplate = new ComposableIndexTemplate(Collections.singletonList(dataStreamName), template, - Collections.emptyList(), 1L, 1L, new HashMap<>(), new ComposableIndexTemplate.DataStreamTemplate("@timestamp")); + Collections.emptyList(), 1L, 1L, new HashMap<>(), new ComposableIndexTemplate.DataStreamTemplate()); PutComposableIndexTemplateRequest putComposableIndexTemplateRequest = new PutComposableIndexTemplateRequest().name("ds-template").create(true).indexTemplate(indexTemplate); AcknowledgedResponse response = execute(putComposableIndexTemplateRequest, diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetComposableIndexTemplatesResponseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetComposableIndexTemplatesResponseTests.java index 97361fc03bd..23759e7b09a 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetComposableIndexTemplatesResponseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indices/GetComposableIndexTemplatesResponseTests.java @@ -86,7 +86,7 @@ public class GetComposableIndexTemplatesResponseTests extends ESTestCase { Long priority = randomBoolean() ? null : randomNonNegativeLong(); Long version = randomBoolean() ? null : randomNonNegativeLong(); if (randomBoolean()) { - dataStreamTemplate = new ComposableIndexTemplate.DataStreamTemplate("@timestamp"); + dataStreamTemplate = new ComposableIndexTemplate.DataStreamTemplate(); } return new ComposableIndexTemplate(patterns, randomTemplate(), composedOf, priority, version, meta, dataStreamTemplate); } diff --git a/docs/reference/data-streams/change-mappings-and-settings.asciidoc b/docs/reference/data-streams/change-mappings-and-settings.asciidoc index 35bea691c7e..cfbe538dcfa 100644 --- a/docs/reference/data-streams/change-mappings-and-settings.asciidoc +++ b/docs/reference/data-streams/change-mappings-and-settings.asciidoc @@ -52,9 +52,7 @@ PUT /_ilm/policy/logs_policy PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -69,9 +67,7 @@ PUT /_index_template/logs_data_stream PUT /_index_template/new_logs_data_stream { "index_patterns": [ "new_logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -124,9 +120,7 @@ for a new field, `message`, to the template. PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -193,9 +187,7 @@ mapping parameter to `true`. PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -279,9 +271,7 @@ template's `index.refresh_interval` index setting to `30s` (30 seconds). PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -345,9 +335,7 @@ The following <> requests adds new PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { @@ -460,9 +448,7 @@ uses the `logs_data_stream` template as its basis, with the following changes: PUT /_index_template/new_logs_data_stream { "index_patterns": [ "new_logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { diff --git a/docs/reference/data-streams/set-up-a-data-stream.asciidoc b/docs/reference/data-streams/set-up-a-data-stream.asciidoc index a0013212658..8464af5b3c6 100644 --- a/docs/reference/data-streams/set-up-a-data-stream.asciidoc +++ b/docs/reference/data-streams/set-up-a-data-stream.asciidoc @@ -134,9 +134,7 @@ this pattern. ---- ==== -* A `data_stream` definition containing the `timestamp_field` property. - This timestamp field must be included in every document indexed to the data - stream. +* A `data_stream` object with an empty body (`{ }`). The template can also contain: @@ -176,9 +174,7 @@ configures the `logs_data_stream` template. PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "settings": { "index.lifecycle.name": "logs_policy" diff --git a/docs/reference/data-streams/use-a-data-stream.asciidoc b/docs/reference/data-streams/use-a-data-stream.asciidoc index 7acaeddb65f..bc2f46931ab 100644 --- a/docs/reference/data-streams/use-a-data-stream.asciidoc +++ b/docs/reference/data-streams/use-a-data-stream.asciidoc @@ -19,8 +19,15 @@ the following: PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" + "data_stream": {}, + "template": { + "mappings": { + "properties": { + "@timestamp": { + "type": "date" + } + } + } } } diff --git a/docs/reference/ilm/ilm-tutorial.asciidoc b/docs/reference/ilm/ilm-tutorial.asciidoc index b02337e3f84..55de4870fd0 100644 --- a/docs/reference/ilm/ilm-tutorial.asciidoc +++ b/docs/reference/ilm/ilm-tutorial.asciidoc @@ -121,19 +121,17 @@ with the options you specify. PUT _index_template/timeseries_template { "index_patterns": ["timeseries"], <1> - "data_stream": { - "timestamp_field": "@timestamp" <2> - }, + "data_stream": {}, "template": { "settings": { "number_of_shards": 1, "number_of_replicas": 1, - "index.lifecycle.name": "timeseries_policy" <3> + "index.lifecycle.name": "timeseries_policy" <2> }, "mappings": { "properties": { "@timestamp": { - "type": "date" <4> + "type": "date" <3> } } } @@ -143,11 +141,9 @@ PUT _index_template/timeseries_template // TEST[continued] <1> Apply the template when a document is indexed into the `timeseries` target. -<2> Identifies the timestamp field for the data source. This field must be present -in all documents indexed into the `timeseries` data stream. -<3> The name of the {ilm-init} policy used to manage the data stream. -<4> A <> or <> field mapping for the -timestamp field specified in the `timestamp_field` property +<2> The name of the {ilm-init} policy used to manage the data stream. +<3> A <> or <> field mapping for the +"@timestamp" field the data stream will use. ==== [discrete] diff --git a/docs/reference/indices/create-data-stream.asciidoc b/docs/reference/indices/create-data-stream.asciidoc index d195a514b7b..c8f0daa71a3 100644 --- a/docs/reference/indices/create-data-stream.asciidoc +++ b/docs/reference/indices/create-data-stream.asciidoc @@ -25,9 +25,7 @@ PUT /_index_template/template } } }, - "data_stream": { - "timestamp_field": "@timestamp" - } + "data_stream": {} } ---- //// diff --git a/docs/reference/indices/delete-data-stream.asciidoc b/docs/reference/indices/delete-data-stream.asciidoc index 62a432cfaba..9992356bd2c 100644 --- a/docs/reference/indices/delete-data-stream.asciidoc +++ b/docs/reference/indices/delete-data-stream.asciidoc @@ -23,9 +23,7 @@ PUT /_index_template/template } } }, - "data_stream": { - "timestamp_field": "@timestamp" - } + "data_stream": {} } PUT /_data_stream/my-data-stream diff --git a/docs/reference/indices/get-data-stream.asciidoc b/docs/reference/indices/get-data-stream.asciidoc index f041e06209e..b477ca6a817 100644 --- a/docs/reference/indices/get-data-stream.asciidoc +++ b/docs/reference/indices/get-data-stream.asciidoc @@ -35,9 +35,7 @@ PUT /_ilm/policy/my-lifecycle-policy PUT /_index_template/my-index-template { "index_patterns": [ "my-data-stream*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { diff --git a/docs/reference/indices/index-templates.asciidoc b/docs/reference/indices/index-templates.asciidoc index 052c13aa634..72df60b518c 100644 --- a/docs/reference/indices/index-templates.asciidoc +++ b/docs/reference/indices/index-templates.asciidoc @@ -493,19 +493,10 @@ PUT /_index_template/template_1 } } }, - "data_stream": { - "timestamp_field": "@timestamp" - } + "data_stream": {} } -------------------------------------------------- -Required properties of a data stream definition: - -`timestamp_field`:: -(Required, string) The name of the timestamp field. This field must be present -in all documents indexed into the data stream and must be of type -<> or <>. - [[multiple-component-templates]] ===== Composing multiple component templates diff --git a/docs/reference/indices/resolve.asciidoc b/docs/reference/indices/resolve.asciidoc index 856809fc4fa..020aba8da99 100644 --- a/docs/reference/indices/resolve.asciidoc +++ b/docs/reference/indices/resolve.asciidoc @@ -30,9 +30,7 @@ PUT /my-index/_alias/f-alias PUT /_index_template/foo_data_stream { "index_patterns": [ "foo" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { diff --git a/docs/reference/indices/rollover-index.asciidoc b/docs/reference/indices/rollover-index.asciidoc index b9161d91fb4..1b8d124dab5 100644 --- a/docs/reference/indices/rollover-index.asciidoc +++ b/docs/reference/indices/rollover-index.asciidoc @@ -241,9 +241,7 @@ PUT _index_template/template } } }, - "data_stream": { - "timestamp_field": "@timestamp" - } + "data_stream": {} } ----------------------------------- // TEST diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.resolve_index/10_basic_resolve_index.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.resolve_index/10_basic_resolve_index.yml index 20546bcfc38..461bfb2e05a 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.resolve_index/10_basic_resolve_index.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.resolve_index/10_basic_resolve_index.yml @@ -1,8 +1,8 @@ --- setup: - skip: - version: "7.8.99 - " - reason: "resolve index api only supported in 7.9+" + version: "7.9.99 - " + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java index 53f9b6eeb01..00ca9e8f6e2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java @@ -102,7 +102,7 @@ public class ComposableTemplateIT extends ESIntegTestCase { Exception expectedException = expectThrows(Exception.class, () -> ComposableIndexTemplate.parse(parser)); ComposableIndexTemplate template = new ComposableIndexTemplate(List.of("logs-*-*"), null, null, null, null, - null, new ComposableIndexTemplate.DataStreamTemplate("@timestamp")); + null, new ComposableIndexTemplate.DataStreamTemplate()); Exception e = expectThrows(IllegalArgumentException.class, () -> client().execute(PutComposableIndexTemplateAction.INSTANCE, new PutComposableIndexTemplateAction.Request("my-it").indexTemplate(template)).actionGet()); Exception actualException = (Exception) e.getCause(); diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java b/server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java index 658cb41a6bc..ae17afae2e0 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java @@ -29,6 +29,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ConstructingObjectParser; +import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.ToXContentObject; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; @@ -249,31 +250,20 @@ public class ComposableIndexTemplate extends AbstractDiffable PARSER = new ConstructingObjectParser<>( + private static final ObjectParser PARSER = new ObjectParser<>( "data_stream_template", - args -> new DataStreamTemplate((String) args[0]) + DataStreamTemplate::new ); - static { - PARSER.declareString(ConstructingObjectParser.constructorArg(), DataStream.TIMESTAMP_FIELD_FIELD); - } - - private final String timestampField; - - public DataStreamTemplate(String timestampField) { - if (FIXED_TIMESTAMP_FIELD.equals(timestampField) == false) { - throw new IllegalArgumentException("unexpected timestamp field [" + timestampField + "]"); - } - - this.timestampField = timestampField; + public DataStreamTemplate() { } public String getTimestampField() { - return timestampField; + return FIXED_TIMESTAMP_FIELD; } - DataStreamTemplate(StreamInput in) throws IOException { - this(in.readString()); + DataStreamTemplate(StreamInput in) { + this(); } /** @@ -281,18 +271,16 @@ public class ComposableIndexTemplate extends AbstractDiffable getDataSteamMappingSnippet() { return singletonMap(MapperService.SINGLE_MAPPING_NAME, singletonMap("_data_stream_timestamp", - singletonMap("path", timestampField))); + singletonMap("path", FIXED_TIMESTAMP_FIELD))); } @Override public void writeTo(StreamOutput out) throws IOException { - out.writeString(timestampField); } @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); - builder.field(DataStream.TIMESTAMP_FIELD_FIELD.getPreferredName(), timestampField); builder.endObject(); return builder; } @@ -300,14 +288,12 @@ public class ComposableIndexTemplate extends AbstractDiffable mappings = MetadataIndexTemplateService.collectMappings(state, "logs-data-stream-template", @@ -985,7 +985,7 @@ public class MetadataIndexTemplateServiceTests extends ESSingleNodeTestCase { state = service.addComponentTemplate(state, true, "ct1", ct1); ComposableIndexTemplate it = new ComposableIndexTemplate(org.elasticsearch.common.collect.List.of("logs*"), null, org.elasticsearch.common.collect.List.of("ct1"), 0L, 1L, null, - new ComposableIndexTemplate.DataStreamTemplate(DEFAULT_TIMESTAMP_FIELD)); + new ComposableIndexTemplate.DataStreamTemplate()); state = service.addIndexTemplateV2(state, true, "logs-template", it); List mappings = MetadataIndexTemplateService.collectMappings(state, "logs-template", @@ -1030,7 +1030,7 @@ public class MetadataIndexTemplateServiceTests extends ESSingleNodeTestCase { " }"), null); ComposableIndexTemplate it = new ComposableIndexTemplate( org.elasticsearch.common.collect.List.of("timeseries*"), template, null, 0L, 1L, null, - new ComposableIndexTemplate.DataStreamTemplate(DEFAULT_TIMESTAMP_FIELD)); + new ComposableIndexTemplate.DataStreamTemplate()); state = service.addIndexTemplateV2(state, true, "timeseries-template", it); List mappings = MetadataIndexTemplateService.collectMappings(state, "timeseries-template", @@ -1352,7 +1352,7 @@ public class MetadataIndexTemplateServiceTests extends ESSingleNodeTestCase { .build(); ComposableIndexTemplate template = new ComposableIndexTemplate(Collections.singletonList("logs-*-*"), - null, null, 100L, null, null, new ComposableIndexTemplate.DataStreamTemplate("@timestamp")); + null, null, 100L, null, null, new ComposableIndexTemplate.DataStreamTemplate()); state = service.addIndexTemplateV2(state, false, "logs", template); @@ -1396,7 +1396,7 @@ public class MetadataIndexTemplateServiceTests extends ESSingleNodeTestCase { // Change the pattern to one that doesn't match the data stream e = expectThrows(IllegalArgumentException.class, () -> { ComposableIndexTemplate newTemplate = new ComposableIndexTemplate(Collections.singletonList("logs-postgres-*"), null, - null, 100L, null, null, new ComposableIndexTemplate.DataStreamTemplate("@timestamp")); + null, 100L, null, null, new ComposableIndexTemplate.DataStreamTemplate()); service.addIndexTemplateV2(stateWithDS, false, "logs", newTemplate); }); @@ -1406,7 +1406,7 @@ public class MetadataIndexTemplateServiceTests extends ESSingleNodeTestCase { // Add an additional template that matches our data stream at a lower priority ComposableIndexTemplate mysqlTemplate = new ComposableIndexTemplate(Collections.singletonList("logs-mysql-*"), null, - null, 50L, null, null, new ComposableIndexTemplate.DataStreamTemplate("@timestamp")); + null, 50L, null, null, new ComposableIndexTemplate.DataStreamTemplate()); ClusterState stateWithDSAndTemplate = service.addIndexTemplateV2(stateWithDS, false, "logs-mysql", mysqlTemplate); // We should be able to replace the "logs" template, because we have the "logs-mysql" template that can handle the data stream diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java index f5556f68dff..e363350c46e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java @@ -78,7 +78,7 @@ public class ToAndFromJsonMetadataTests extends ESTestCase { 5L, 4L, Collections.singletonMap("my_meta", Collections.singletonMap("potato", "chicken")), - randomBoolean() ? null : new ComposableIndexTemplate.DataStreamTemplate("@timestamp"))) + randomBoolean() ? null : new ComposableIndexTemplate.DataStreamTemplate())) .put(IndexMetadata.builder("test12") .settings(settings(Version.CURRENT) .put("setting1", "value1") diff --git a/x-pack/docs/en/security/authorization/alias-privileges.asciidoc b/x-pack/docs/en/security/authorization/alias-privileges.asciidoc index 8c1e29ebcc4..96969d1012b 100644 --- a/x-pack/docs/en/security/authorization/alias-privileges.asciidoc +++ b/x-pack/docs/en/security/authorization/alias-privileges.asciidoc @@ -43,9 +43,7 @@ backing indices, the user can retrieve a document directly from `.ds-logs-000002 PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "template": { "mappings": { "properties": { diff --git a/x-pack/plugin/core/src/main/resources/logs-template.json b/x-pack/plugin/core/src/main/resources/logs-template.json index 84546a9c772..0e23872ec01 100644 --- a/x-pack/plugin/core/src/main/resources/logs-template.json +++ b/x-pack/plugin/core/src/main/resources/logs-template.json @@ -1,9 +1,7 @@ { "index_patterns": ["logs-*-*"], "priority": 100, - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "composed_of": [ "logs-mappings", "logs-settings" diff --git a/x-pack/plugin/core/src/main/resources/metrics-template.json b/x-pack/plugin/core/src/main/resources/metrics-template.json index b13857c1c70..cccd852196d 100644 --- a/x-pack/plugin/core/src/main/resources/metrics-template.json +++ b/x-pack/plugin/core/src/main/resources/metrics-template.json @@ -1,9 +1,7 @@ { "index_patterns": ["metrics-*-*"], "priority": 100, - "data_stream": { - "timestamp_field": "@timestamp" - }, + "data_stream": {}, "composed_of": [ "metrics-mappings", "metrics-settings" diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/100_delete_by_query.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/100_delete_by_query.yml index 08a12632bea..2e5aa17bfe2 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/100_delete_by_query.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/100_delete_by_query.yml @@ -12,8 +12,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/10_basic.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/10_basic.yml index 6f31510151b..6e36f15ed93 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/10_basic.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/10_basic.yml @@ -3,7 +3,6 @@ setup: features: allowed_warnings version: " - 7.9.99" reason: "enable in 7.9+ when backported" - - do: allowed_warnings: - "index template [my-template1] has index patterns [simple-data-stream1] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template1] will take precedence during new index creation" @@ -14,8 +13,8 @@ setup: template: settings: index.number_of_replicas: 0 - data_stream: - timestamp_field: '@timestamp' + data_stream: {} + - do: allowed_warnings: - "index template [my-template2] has index patterns [simple-data-stream2] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template2] will take precedence during new index creation" @@ -28,8 +27,7 @@ setup: properties: '@timestamp': type: date_nanos - data_stream: - timestamp_field: '@timestamp' + data_stream: {} --- "Create data stream": @@ -243,8 +241,8 @@ setup: name: generic_logs_template body: index_patterns: logs-* - data_stream: - timestamp_field: '@timestamp' + data_stream: {} + - do: index: @@ -299,8 +297,7 @@ setup: name: generic_logs_template body: index_patterns: logs-* - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: catch: bad_request diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/110_update_by_query.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/110_update_by_query.yml index 8f447762679..5f525e44c3e 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/110_update_by_query.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/110_update_by_query.yml @@ -12,8 +12,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/20_unsupported_apis.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/20_unsupported_apis.yml index 80351c05e38..9149eb91ebe 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/20_unsupported_apis.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/20_unsupported_apis.yml @@ -12,8 +12,7 @@ name: my-template body: index_patterns: [logs-*] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -61,8 +60,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -101,7 +99,7 @@ "Prohibit shrink on data stream's write index": - skip: version: " - 7.9.99" - reason: "data streams only supported in 7.9+" + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: @@ -111,8 +109,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -149,8 +146,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -171,7 +167,7 @@ "Prohibit split on data stream's write index": - skip: version: " - 7.9.99" - reason: "enable in 7.9+ when backported" + reason: "data streams only supported in 7.9+" features: allowed_warnings - do: @@ -181,8 +177,7 @@ name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/30_auto_create_data_stream.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/30_auto_create_data_stream.yml index 5b91e8fccd2..ed6e59ffe97 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/30_auto_create_data_stream.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/30_auto_create_data_stream.yml @@ -12,8 +12,7 @@ name: generic_logs_template body: index_patterns: logs-* - data_stream: - timestamp_field: '@timestamp' + data_stream: {} template: settings: number_of_shards: 1 diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/40_supported_apis.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/40_supported_apis.yml index ae77d238494..3d12258ec63 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/40_supported_apis.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/40_supported_apis.yml @@ -4,7 +4,6 @@ setup: features: allowed_warnings version: " - 7.9.99" reason: "enable in 7.9+ when backported" - - do: allowed_warnings: - "index template [logs_template] has index patterns [logs-foobar] matching patterns from existing older templates [global] with patterns (global => [*]); this template [logs_template] will take precedence during new index creation" @@ -12,8 +11,7 @@ setup: name: logs_template body: index_patterns: logs-foobar - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -41,8 +39,8 @@ teardown: --- "Verify get mapping api": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "enable in 7.9+ when backported" - do: indices.get_mapping: @@ -53,8 +51,9 @@ teardown: --- "Verify shard stores api": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "change to 7.8.99 after backport" + features: allowed_warnings - do: allowed_warnings: @@ -67,8 +66,7 @@ teardown: settings: number_of_shards: "1" number_of_replicas: "0" - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -115,8 +113,7 @@ teardown: name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -148,8 +145,7 @@ teardown: name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -182,8 +178,7 @@ teardown: name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/50_delete_backing_indices.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/50_delete_backing_indices.yml index ad550d66e41..69f8b71fcbd 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/50_delete_backing_indices.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/50_delete_backing_indices.yml @@ -10,8 +10,7 @@ setup: name: my-template body: index_patterns: [simple-*] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} --- "Delete backing index on data stream": @@ -69,7 +68,7 @@ setup: "Attempt to delete write index on data stream is rejected": - skip: version: " - 7.9.99" - reason: "enable in 7.9+ when backported" + reason: "enable in 7.9+ when backported9+" - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/60_get_backing_indices.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/60_get_backing_indices.yml index 23f1e26392b..785b7632cad 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/60_get_backing_indices.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/60_get_backing_indices.yml @@ -12,8 +12,7 @@ name: my-template body: index_patterns: [data-*] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/70_rollover_data_streams.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/70_rollover_data_streams.yml index f7056c52fac..08ffac907ac 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/70_rollover_data_streams.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/70_rollover_data_streams.yml @@ -12,8 +12,7 @@ name: my-template body: index_patterns: [data-*] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/80_resolve_index_data_streams.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/80_resolve_index_data_streams.yml index f8516488f20..478bda2471a 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/80_resolve_index_data_streams.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/80_resolve_index_data_streams.yml @@ -12,8 +12,7 @@ setup: name: my-template1 body: index_patterns: [simple-data-stream1] - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: allowed_warnings: @@ -22,13 +21,7 @@ setup: name: my-template2 body: index_patterns: [simple-data-stream2] - template: - mappings: - properties: - '@timestamp': - type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/90_reindex.yml b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/90_reindex.yml index 28c1c68d898..204ecb62a24 100644 --- a/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/90_reindex.yml +++ b/x-pack/plugin/data-streams/qa/rest/src/test/resources/rest-api-spec/test/data-streams/90_reindex.yml @@ -12,8 +12,7 @@ setup: name: generic_logs_template body: index_patterns: logs-* - data_stream: - timestamp_field: '@timestamp' + data_stream: {} --- teardown: diff --git a/x-pack/plugin/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/DataStreamIT.java b/x-pack/plugin/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/DataStreamIT.java index 4224cf4cd46..9a0ba9bd745 100644 --- a/x-pack/plugin/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/DataStreamIT.java +++ b/x-pack/plugin/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/DataStreamIT.java @@ -294,7 +294,7 @@ public class DataStreamIT extends ESIntegTestCase { null, null, null, - new ComposableIndexTemplate.DataStreamTemplate("@timestamp") + new ComposableIndexTemplate.DataStreamTemplate() ) ); client().execute(PutComposableIndexTemplateAction.INSTANCE, request).actionGet(); @@ -376,7 +376,7 @@ public class DataStreamIT extends ESIntegTestCase { null, null, null, - new ComposableIndexTemplate.DataStreamTemplate("@timestamp") + new ComposableIndexTemplate.DataStreamTemplate() ) ); @@ -837,7 +837,7 @@ public class DataStreamIT extends ESIntegTestCase { null, null, null, - new ComposableIndexTemplate.DataStreamTemplate("@timestamp") + new ComposableIndexTemplate.DataStreamTemplate() ) ); client().execute(PutComposableIndexTemplateAction.INSTANCE, createTemplateRequest).actionGet(); @@ -1005,7 +1005,7 @@ public class DataStreamIT extends ESIntegTestCase { null, null, null, - new ComposableIndexTemplate.DataStreamTemplate("@timestamp") + new ComposableIndexTemplate.DataStreamTemplate() ) ); client().execute(PutComposableIndexTemplateAction.INSTANCE, request).actionGet(); diff --git a/x-pack/plugin/eql/qa/rest/src/test/resources/rest-api-spec/test/eql/20_data_streams.yml b/x-pack/plugin/eql/qa/rest/src/test/resources/rest-api-spec/test/eql/20_data_streams.yml index 0e4e01c1977..c7f889c2415 100644 --- a/x-pack/plugin/eql/qa/rest/src/test/resources/rest-api-spec/test/eql/20_data_streams.yml +++ b/x-pack/plugin/eql/qa/rest/src/test/resources/rest-api-spec/test/eql/20_data_streams.yml @@ -17,8 +17,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java b/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java index 9f633d6e5c0..617524fa483 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java @@ -125,7 +125,7 @@ public final class TimeSeriesRestDriver { StringEntity templateJSON = new StringEntity( String.format(Locale.ROOT, "{\n" + " \"index_patterns\": \"%s\",\n" + - " \"data_stream\": { \"timestamp_field\": \"@timestamp\" },\n" + + " \"data_stream\": {},\n" + " \"template\": %s\n" + "}", indexPattern, Strings.toString(builder)), ContentType.APPLICATION_JSON); diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java index dcc8ad89488..392ab2cb7a5 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/ClassificationIT.java @@ -729,7 +729,7 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase { " }"; if (isDatastream) { try { - createDataStreamAndTemplate(index, "@timestamp", mapping); + createDataStreamAndTemplate(index, mapping); } catch (IOException ex) { throw new ElasticsearchException(ex); } diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java index 03525e76c3d..8780347b522 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DatafeedJobsIT.java @@ -114,7 +114,7 @@ public class DatafeedJobsIT extends MlNativeAutodetectIntegTestCase { " }" + " }\n" + " }"; - createDataStreamAndTemplate("datafeed_data_stream", "@timestamp", mapping); + createDataStreamAndTemplate("datafeed_data_stream", mapping); long numDocs = randomIntBetween(32, 2048); long now = System.currentTimeMillis(); long oneWeekAgo = now - 604800000; diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java index bec9d15a857..975c983cd3b 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java @@ -275,7 +275,7 @@ abstract class MlNativeIntegTestCase extends ESIntegTestCase { } } - protected static void createDataStreamAndTemplate(String dataStreamName, String timeField, String mapping) throws IOException { + protected static void createDataStreamAndTemplate(String dataStreamName, String mapping) throws IOException { client().execute(PutComposableIndexTemplateAction.INSTANCE, new PutComposableIndexTemplateAction.Request(dataStreamName + "_template") .indexTemplate(new ComposableIndexTemplate(Collections.singletonList(dataStreamName), @@ -284,7 +284,7 @@ abstract class MlNativeIntegTestCase extends ESIntegTestCase { null, null, null, - new ComposableIndexTemplate.DataStreamTemplate(timeField)))) + new ComposableIndexTemplate.DataStreamTemplate()))) .actionGet(); client().execute(CreateDataStreamAction.INSTANCE, new CreateDataStreamAction.Request(dataStreamName)).actionGet(); } diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java index a0851918d7b..7453bf176a6 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java @@ -487,7 +487,7 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase { " }"; if (dataStream) { try { - createDataStreamAndTemplate(sourceIndex, "@timestamp", mapping); + createDataStreamAndTemplate(sourceIndex, mapping); } catch (IOException ex) { throw new ElasticsearchException(ex); } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/data_stream/10_data_stream_resolvability.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/data_stream/10_data_stream_resolvability.yml index bb9fffd7865..33990977ecf 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/data_stream/10_data_stream_resolvability.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/data_stream/10_data_stream_resolvability.yml @@ -1,8 +1,8 @@ --- "Verify data stream resolvability for xpack apis": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: @@ -17,8 +17,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -54,8 +53,8 @@ --- "Verify data stream resolvability in ilm explain api": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: @@ -88,8 +87,7 @@ name: generic_logs_template body: index_patterns: logs-* - data_stream: - timestamp_field: '@timestamp' + data_stream: {} template: settings: index.lifecycle.name: "my_lifecycle" @@ -119,8 +117,8 @@ --- "Verify data stream resolvability rollup": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: @@ -135,8 +133,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -196,8 +193,7 @@ type: date settings: index.lifecycle.name: "my_moveable_timeseries_lifecycle" - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -261,8 +257,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -318,8 +313,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -358,8 +352,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: @@ -433,8 +426,7 @@ type: keyword price: type: integer - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml index 051dee0328d..c49e958e80a 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/indices.freeze/10_basic.yml @@ -136,8 +136,8 @@ --- "Cannot freeze write index for data stream": - skip: - version: " - 7.8.99" - reason: "data streams only supported in 7.9+" + version: " - 7.9.99" + reason: "enable in 7.9+ when backported" features: allowed_warnings - do: @@ -152,8 +152,7 @@ properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/50_data_streams.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/50_data_streams.yml index e10890191d1..ebeb19baf17 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/50_data_streams.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/security/authz/50_data_streams.yml @@ -61,8 +61,7 @@ setup: properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} --- teardown: diff --git a/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformRestTestCase.java b/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformRestTestCase.java index 3cc84c06ff8..f7b7107e4a3 100644 --- a/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformRestTestCase.java +++ b/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformRestTestCase.java @@ -121,7 +121,6 @@ public abstract class TransformRestTestCase extends ESRestTestCase { "{\n" + " \"index_patterns\": [ \"" + indexName + "\" ],\n" + " \"data_stream\": {\n" + - " \"timestamp_field\": \"@timestamp\"\n" + " },\n" + " \"template\": \n" + Strings.toString(builder) + "}" diff --git a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml index 01cb2715084..a87eb9bd63b 100644 --- a/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml +++ b/x-pack/qa/multi-cluster-search-security/src/test/resources/rest-api-spec/test/remote_cluster/10_basic.yml @@ -68,8 +68,8 @@ setup: properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} + - do: allowed_warnings: - "index template [my-template2] has index patterns [simple-data-stream2] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template2] will take precedence during new index creation" @@ -82,8 +82,7 @@ setup: properties: '@timestamp': type: date - data_stream: - timestamp_field: '@timestamp' + data_stream: {} - do: indices.create_data_stream: diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java index 5a85e2e41c9..cafc42e61d8 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java @@ -33,7 +33,6 @@ public class DataStreamsUpgradeIT extends AbstractUpgradeTestCase { " }\n" + " },\n" + " \"data_stream\":{\n" + - " \"timestamp_field\":\"@timestamp\"" + " }\n" + " }"; Request request = new Request("PUT", "/_index_template/1");