-
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
Here is a recreation:
DELETE index
PUT index
{
"mappings": {
"doc": {
"properties": {
"my_date": {
"type": "date",
"format": "yyyy/MM/dd"
}
}
}
}
}
PUT index/_mapping/doc
{
"doc": {
"properties": {
"my_date": {
"type": "date",
"format": "yyyy-MM-dd"
}
}
}
}
GET index/_mapping
date allows its format to be updated. This is trappy because then it could be changed to a format that doesn't work with already indexed documents, or even worse: a format that parses to a different date.
I think we need to ensure that the format either cannot be changed, or make it a list that is append-only so that it is only possible to append date formats.
valpackett
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