-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Change default format for date_nanos field #70463
Conversation
This commit updates the default format of date_nanos field on existing and new indices to use `strict_date_optional_time_nanos` instead of `strict_date_optional_time`. Using `strict_date_optional_time` as the default format for date_nanos doesn't make sense because it accepts and parses dates with nanosecond precision, but when it formats it drops the nanoseconds. The change should be transparent for users, these formats accept the same input. Relates elastic#69192 Closes elastic#67063
Pinging @elastic/es-search (Team:Search) |
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.
This seems like a nice, simple fix!
server/src/main/java/org/elasticsearch/index/mapper/DateFieldMapper.java
Outdated
Show resolved
Hide resolved
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.
This looks good to me. I couldn't think of a way in which this would be 'breaking', it feels more like an enhancement or even bug fix.
This commit updates the default format of date_nanos field on existing and new indices to use `strict_date_optional_time_nanos` instead of `strict_date_optional_time`. Using `strict_date_optional_time` as the default format for date_nanos doesn't make sense because it accepts and parses dates with nanosecond precision, but when it formats it drops the nanoseconds. The change should be transparent for users, these formats accept the same input. Relates #69192 Closes #67063
This commit updates the default format of date_nanos field on existing and new indices to use `strict_date_optional_time_nanos` instead of `strict_date_optional_time`. Using `strict_date_optional_time` as the default format for date_nanos doesn't make sense because it accepts and parses dates with nanosecond precision, but when it formats it drops the nanoseconds. The change should be transparent for users, these formats accept the same input. Relates #69192 Closes #67063
This change rewrites the rolling upgrade yml test that was added for date_nanos in Java. This is needed to allow extra logic when backporting to 7.x. date_nanos are not available in 6.x so we need to skip the upgraded test based on the version of the old cluster. Relates elastic#70463
This change rewrites the rolling upgrade yml test that was added for date_nanos in Java. This is needed to allow extra logic when backporting to 7.x. date_nanos are not available in 6.x so we need to skip the upgraded test based on the version of the old cluster. Relates #70463
This change rewrites the rolling upgrade yml test that was added for date_nanos in Java. This is needed to allow extra logic when backporting to 7.x. date_nanos are not available in 6.x so we need to skip the upgraded test based on the version of the old cluster. Relates #70463
This commit updates the default format of date_nanos field
on existing and new indices to use
strict_date_optional_time_nanos
instead ofstrict_date_optional_time
.Using
strict_date_optional_time
as the default format for date_nanos doesn'tmake sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.
Relates #69192
Closes #67063