OpenSearch/client
Martijn van Groningen 17bd559253
Fix the timestamp field of a data stream to @timestamp (#59210)
Backport of #59076 to 7.x branch.

The commit makes the following changes:
* The timestamp field of a data stream definition in a composable
  index template can only be set to '@timestamp'.
* Removed custom data stream timestamp field validation and reuse the validation from `TimestampFieldMapper` and
  instead only check that the _timestamp field mapping has been defined on a backing index of a data stream.
* Moved code that injects _timestamp meta field mapping from `MetadataCreateIndexService#applyCreateIndexRequestWithV2Template58956(...)` method
  to `MetadataIndexTemplateService#collectMappings(...)` method.
* Fixed a bug (#58956) that cases timestamp field validation to be performed
  for each template and instead of the final mappings that is created.
* only apply _timestamp meta field if index is created as part of a data stream or data stream rollover,
this fixes a docs test, where a regular index creation matches (logs-*) with a template with a data stream definition.

Relates to #58642
Relates to #53100
Closes #58956
Closes #58583
2020-07-08 17:30:46 +02:00
..
benchmark Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
client-benchmark-noop-api-plugin Deduplicate Empty InternalAggregations (#58386) (#59032) 2020-07-04 14:02:16 +02:00
rest Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
rest-high-level Fix the timestamp field of a data stream to @timestamp (#59210) 2020-07-08 17:30:46 +02:00
sniffer Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
test Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00
transport Replace compile configuration usage with api (7.x backport) (#58721) 2020-06-30 15:57:41 +02:00