-
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 Elasticsearch
Description
The changes introduced by #36924 make it so that mappings specified at index creation time are ignored, and index template mappings take precedent.
After these changes, if you create an index template:
PUT _template/test
{
"index_patterns": ["test"],
"mappings": {
"_doc": {
"properties": {
"foo": {
"type": "keyword"
}
}
}
}
}
and then create an index which adds a new property:
PUT test
{
"mappings": {
"_doc": {
"properties": {
"bar": {
"type": "keyword"
}
}
}
}
}
The created mappings will only have the properties defined in the template:
GET test/_mapping
{
"test" : {
"mappings" : {
"_doc" : {
"properties" : {
"foo" : {
"type" : "keyword"
}
}
}
}
}
}
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 Elasticsearch