-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make timestamp field mapping part of data stream definition. #58642
Closed
martijnvg
wants to merge
13
commits into
elastic:master
from
martijnvg:add_mapping_data_stream_template
Closed
Make timestamp field mapping part of data stream definition. #58642
martijnvg
wants to merge
13
commits into
elastic:master
from
martijnvg:add_mapping_data_stream_template
Commits on Jun 28, 2020
-
Make timestamp field mapping part of data stream definition.
Instead of requiring that the field mapping for the timestamp field is defined in the mapping of the composable index template for data streams, the mapping should also be definable in the data stream definition itself, since the field name of the data stream is already defined there. The timestamp field mapping will be applied when a new backing index of a data stream is being created. When a new data stream is created and composable index templates are evaluated then the mapping are applied in the following order: * Optional mappings from component templates that are associated with the matching template * Optional mappings from the matching template itself. * Optional timestamp field mapping from data stream definition of the matching template. If no mapping for timestamp field is defined in a component template, composable index template, data stream definition inside a composable index template then a default mapping for the timestamp field will be generated at data stream creation time. Before this commit the field mapping of the timestamp field should be defined as mapping in the composable template: ``` PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], "data_stream": { "timestamp_field": "@timestamp" }, "template": { "mappings": { "properties": { "@timestamp": { "type": "date" } } } } } ``` With this commit, the timestamp field mapping may also be defined as part of the data stream definition: ``` PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], "data_stream": { "timestamp_field": "@timestamp", "timestamp_mapping": { "type": "date" } } } ``` The field mapping is now also optional: ``` PUT /_index_template/logs_data_stream { "index_patterns": [ "logs*" ], "data_stream": { "timestamp_field": "@timestamp" } } ``` In the latter case the following mapping snippet is used as default: {"type": "date"} Closes to elastic#58583
Configuration menu - View commit details
-
Copy full SHA for 7ee2839 - Browse repository at this point
Copy the full SHA 7ee2839View commit details
Commits on Jun 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a23cc1a - Browse repository at this point
Copy the full SHA a23cc1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for aeba6f7 - Browse repository at this point
Copy the full SHA aeba6f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5b79a1 - Browse repository at this point
Copy the full SHA d5b79a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d3a8faa - Browse repository at this point
Copy the full SHA d3a8faaView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed41377 - Browse repository at this point
Copy the full SHA ed41377View commit details
Commits on Jun 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 344df52 - Browse repository at this point
Copy the full SHA 344df52View commit details -
Configuration menu - View commit details
-
Copy full SHA for da2df6b - Browse repository at this point
Copy the full SHA da2df6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9255942 - Browse repository at this point
Copy the full SHA 9255942View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39d22cf - Browse repository at this point
Copy the full SHA 39d22cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32c7c68 - Browse repository at this point
Copy the full SHA 32c7c68View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9f2bc9 - Browse repository at this point
Copy the full SHA e9f2bc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a50c36 - Browse repository at this point
Copy the full SHA 3a50c36View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.