Elasticsearch Version
8.3.2
Installed Plugins
No response
Java Version
bundled
OS Version
Ubuntu 20.04.4 LTS
Problem Description
When we have two legacy index templates and one of them defines the field name with dots (.), we may get mapper_parsing_exception.
Steps to Reproduce
- create two legacy index templates
PUT /_template/template1
{
"order": 100,
"index_patterns": [
"haha*"
],
"settings": {},
"mappings": {
"properties": {
"kwm": {
"properties": {
"source": {
"properties": {
"geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
},
"source": {
"properties": {
"geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
}
}
PUT /_template/template2
{
"order": 10,
"index_patterns": [
"haha*"
],
"settings": {},
"mappings": {
"properties": {
"kwm.source.geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
- try to create an index
it produces mapper_parsing_exception in 8.3.2 as below
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Field [source.geo.location] is defined more than once"
}
],
"type": "mapper_parsing_exception",
"reason": "Field [source.geo.location] is defined more than once"
},
"status": 400
}
but no error in 8.2.3
- if we change the second index template
template2 as below:
PUT /_template/template2
{
"order": 10,
"index_patterns": [
"haha*"
],
"settings": {},
"mappings": {
"properties": {
"kwm": {
"properties": {
"source": {
"properties": {
"geo": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
}
}
}
}
we can create the haha index without errors in both 8.3.2 and 8.2.3
I think we should not get mapper_parsing_exception in both 8.3.2 and 8.2.3 in the step 3 because kwm.source.geo.location field definition of two index templates are identical and source.geo.location is defined only in the template1 index template.
I think this may be related with #86166
Logs (if relevant)
No response
Elasticsearch Version
8.3.2
Installed Plugins
No response
Java Version
bundled
OS Version
Ubuntu 20.04.4 LTS
Problem Description
When we have two legacy index templates and one of them defines the field name with dots (.), we may get mapper_parsing_exception.
Steps to Reproduce
it produces
mapper_parsing_exceptionin8.3.2as belowbut no error in
8.2.3template2as below:we can create the
hahaindex without errors in both8.3.2and8.2.3I think we should not get
mapper_parsing_exceptionin both8.3.2and8.2.3in the step 3 becausekwm.source.geo.locationfield definition of two index templates are identical andsource.geo.locationis defined only in thetemplate1index template.I think this may be related with #86166
Logs (if relevant)
No response