-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[Doc] migration guide joda #51986
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
[Doc] migration guide joda #51986
Conversation
|
Pinging @elastic/es-docs (>docs) |
|
@elasticmachine test this please |
|
@elasticmachine test this please |
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
| Most of the custom date formats are compatible, but with some there is a change of meaning or missing. More on that below. | ||
| A custom format is specified on a date field like this: | ||
| [source,console] | ||
| -------------------------------------------------- | ||
| PUT my_index | ||
| { | ||
| "mappings": { | ||
| "properties": { | ||
| "date": { | ||
| "type": "date", | ||
| "format": "YYYY/MM/dd HH:mm:ss||YYYY/MM/dd||epoch_millis" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| -------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this section entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove
| } | ||
| -------------------------------------------------- | ||
|
|
||
| To make sure if any of the date formats is deprecated run deprecation API or kibana upgrade assistant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To see if your date format is impacted, use the <<migration-api-deprecation,deprecation info API>>
or the {kibana-ref}/upgrade-assistant.html[Kibana upgrade assistant]
| //todo fix this | ||
| xx migration-api-deprecation xx | ||
| xxinclude ::../apis/deprecation.asciidoc | ||
|
|
||
| Sample output of deprecation api will be as follows: | ||
| [source,text] | ||
| -------------------------------------------------- | ||
| This index has date fields with deprecated formats: [[type: doc, field: param2, format: yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis, suggestion: 'y' year should be replaced with 'u'. Use 'y' for year-of-era.]]. Prefix your date format with '8' to use the new specifier. | ||
| -------------------------------------------------- | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is needed. I'd remove it.
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
| ==== Incompatible formats | ||
| If a pattern contains literals below, that means the pattern is incompatible and needs to be changed. | ||
|
|
||
| ===== Y - in 6.8 meaning Year of era. It should be replaced to y in 7.0 This is a big change because in 7.0 'Y' means week-based-year. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using headings =====, I'd create a definition list with each literal:
`Y` (Year of era)::
+
--
Replace with `y`.
*Example:*
`YYYY-MM-dd` should become `yyyy-MM-dd`
In java time, `Y` is used for
https://docs.oracle.com/javase/8/docs/api/java/time/temporal/WeekFields.html[week-based
year]. Using `Y` in place of `y` could result in off-by-one errors in year
calculation.
--
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea - fixed
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…idoc Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
…csearch into doc/migration_guide_joda
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
| You can however update your pipelines or templates. Remember to look for templates you use with tools outside ES. | ||
| If you specified a custom date format there, then you need to update it too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this is covered well later.
| You can however update your pipelines or templates. Remember to look for templates you use with tools outside ES. | |
| If you specified a custom date format there, then you need to update it too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the part of external templates
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
docs/reference/migration/migrate_7_0/migrate_to_java_time.asciidoc
Outdated
Show resolved
Hide resolved
jrodewig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
I left some comments that should be addressed here:
- https://github.com/elastic/elasticsearch/pull/51986/files#r395665568
- https://github.com/elastic/elasticsearch/pull/51986/files#r395676241
- https://github.com/elastic/elasticsearch/pull/51986/files#r395678327
- https://github.com/elastic/elasticsearch/pull/51986/files#r395671514
The other comments are optional. Feel free to ignore them if you see fit.
…csearch into doc/migration_guide_joda
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
closes #51614
closes #51236