Skip to content

Conversation

@pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Feb 6, 2020

closes #51614
closes #51236

@pgomulka pgomulka added the >docs General docs changes label Feb 6, 2020
@pgomulka pgomulka self-assigned this Feb 6, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@pgomulka
Copy link
Contributor Author

@elasticmachine test this please

@pgomulka
Copy link
Contributor Author

@elasticmachine test this please

@pgomulka pgomulka changed the title WIP [Doc] migration guide joda [Doc] migration guide joda Mar 17, 2020
@jrodewig jrodewig self-requested a review March 17, 2020 16:47
Comment on lines 10 to 25
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"
}
}
}
}
--------------------------------------------------
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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]

Comment on lines 28 to 37
//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.
--------------------------------------------------

Copy link
Contributor

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.

==== 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.
Copy link
Contributor

@jrodewig jrodewig Mar 17, 2020

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.
--

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea - fixed

pgomulka and others added 9 commits March 20, 2020 13:17
…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>
@jrodewig jrodewig self-requested a review March 20, 2020 12:34
Comment on lines 234 to 235
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.
Copy link
Contributor

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.

Suggested change
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.

Copy link
Contributor Author

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

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>docs General docs changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants