-
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
Formats date_optional_time and dateOptionalTime are no longer interchangeable #57672
Comments
Pinging @elastic/es-search (:Search/Mapping) |
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
Thank you for raising this @kstevens715 the behaviour for single formats like I don't think interchangeability was intentional (just a side effect of mini optimisation in https://github.com/elastic/elasticsearch/blob/7.5/server/src/main/java/org/elasticsearch/common/time/DateFormatter.java#L146 I think we should fix this - allow interchangeability for both single and combined patterns. I also think that there is little benefit with having patterns in both camel and snake case. the problem with interchangeability for single formats does not exist in master as it was not affected by the fix #48703 (only merged in 7.x as it was aimed at '8' prefix issue). The problem exist for combined patterns |
This interchangeability was never documented. While I understand the frustration, I don't think we should add this back, as it was an implementation detail. Instead, we should just remove all the camelCase variants. I had thought we did this already, but realized that was for rest parameters, but we missed named date formats. |
closed by #57878 |
Elasticsearch version (
bin/elasticsearch --version
): 7.7.1 and 7.6.2. I'm currently using Docker with image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1Plugins installed: []
JVM version (
java -version
): Returns nothing in Docker container.OS version (
uname -a
if on a Unix-like system): Linux 1a0ec47b8a82 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxDescription of the problem including expected versus actual behavior:
You update a date format mapping from "dateOptionalTime" to "date_optional_time".
Expected: As in 7.5.2, the update is successful since both format strings are interchangeable.
Actual: In 7.6.2 and 7.7.1, an error is raised about "conflicts with existing mapping" (see below).
We always update mappings with "dateOptionalTime" but the mappings somehow got changed to "date_optional_time" recently (probably when upgrading from 7.5.2 -> 7.6.2). We ran into this error when updating mappings as we usually do.
Steps to reproduce:
Error on last command:
The text was updated successfully, but these errors were encountered: