-
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
Or toXContent is broken.
Reproduce:
DELETE test_index
PUT test_index
{
"mappings": {
"type1": {
"properties": {
"field": {
"type": "string"
}
}
},
"type2": {
"properties": {
"field": {
"type": "string"
}
}
}
}
}
GET test_index/_mapping/field/field?include_defaults
PUT test_index/type1/_mapping?update_all_types
{
"properties": {
"field": {
"type": "string",
"search_analyzer": "keyword",
"analyzer": "default"
}
}
}
In the mapping I retrieve with the GET _mapping API in the mapping only type1 is updated, although with the GET field mapping API I get the correct mapping.
GET test_index/_mapping
{
"test_index": {
"mappings": {
"type1": {
"properties": {
"field": {
"type": "string",
"analyzer": "default",
"search_analyzer": "keyword"
}
}
},
"type2": {
"properties": {
"field": {
"type": "string"
}
}
}
}
}
}
GET test_index/_mapping/field/field
{
"test_index": {
"mappings": {
"type2": {
"field": {
"full_name": "field",
"mapping": {
"field": {
"type": "string",
"analyzer": "default",
"search_analyzer": "keyword"
}
}
}
},
"type1": {
"field": {
"full_name": "field",
"mapping": {
"field": {
"type": "string",
"analyzer": "default",
"search_analyzer": "keyword"
}
}
}
}
}
}
}
When I restart the node the change has vanished from the field mapping result but still is in the get mapping result.
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