-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Supporting dots ('.') as separator for dynamic_date_formats #10961
Comments
The workaround for this will be to refactor our mapping and add slashes to the dynamic format:
Also, to use any of the date formats suggested in our documentation. |
@gmoskovicz In what locales are periods used in dates by default? |
@clintongormley we have been seeing that some systems are using dot separator as the default for their dates. A wat to hack this is also to add seconds to the date format, therefore it will contain 2 ":" and will overpass the restriction:
Nowadays the restriction is that the full pattern should contain at least 2 ":", two "-" or two "/" |
But i am concerned also that there are not strict locales using periods in dates by default. |
The problem with using periods for date detection is that it could break floating point numbers, written as strings. Also, I don't know of any locales that use periods by default (but that may just be ignorance). We could reduce the requirement for "more than 1" colon, slash etc for date detection. Or maybe this would cease to be an issue if we finally get around to merging #6227 /cc @spinscale |
According to this there are some using dots as separator. |
Closing in favour of #1694 |
dynamic_date_formats does don't support dots in mapping
Steps to repro
1- Modify default-mapping.json file and add
2- Create new index and add a new document, without setting the mapping
3- Verify that the my_date field is stored as string, and not as date
According to the DocumentParser.java we only allow ":", "-" and "/" for separator for dynamic dates.
The text was updated successfully, but these errors were encountered: