-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchhelp wantedadoptmeadoptme
Description
dynamic_date_formats does don't support dots in mapping
Steps to repro
1- Modify default-mapping.json file and add
{
"_default_" : {
"dynamic_date_formats" : ["yyyy.MM.dd HH:mm"]
}
}
2- Create new index and add a new document, without setting the mapping
{
"my_date": "2012.03.08 12:30"
}
3- Verify that the my_date field is stored as string, and not as date
{
"tryit_now": {
"mappings": {
"dateFormats": {
"dynamic_date_formats": [
"yyyy.MM.dd HH:mm"
],
"properties": {
"my_date": {
"type": "string"
}
}
}
}
}
}
According to the DocumentParser.java we only allow ":", "-" and "/" for separator for dynamic dates.
Metadata
Metadata
Assignees
Labels
:Search Foundations/MappingIndex mappings, including merging and defining field typesIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in ElasticsearchMeta label for the Search Foundations team in Elasticsearchhelp wantedadoptmeadoptme