Elasticsearch version: 6.2.4
Plugins installed: []
JVM version: 1.8.0_172
OS version: MacOS (Darwin Kernel Version 15.6.0)
Description of the problem including expected versus actual behavior:
PUT test
{
"mappings": {
"_doc": {
"dynamic_templates": [
{
"template": {
"path_match": "prop1.prop2.*",
"mapping": {
"type": "keyword",
"index": false
}
}
}
],
"properties": {
"prop1": {
"properties": {
"prop2": {
"type": "object",
"dynamic": true
}
}
}
}
}
}
}
PUT test/_doc/1
{
"prop1": {
"prop2": {
"prop3": {
"prop4": {
"field": "bar"
}
}
}
}
}
Returns the following error:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "failed to parse [prop1.prop2.prop3]"
}
],
"type": "mapper_parsing_exception",
"reason": "failed to parse [prop1.prop2.prop3]",
"caused_by": {
"type": "illegal_state_exception",
"reason": "Can't get text on a START_OBJECT at 4:16"
}
},
"status": 400
}
However, if you replace the path_match in the dynamic template to prop1.prop2.*.field, it works as expected and matches prop1.prop2.prop3.prop4.field.
Elasticsearch version: 6.2.4
Plugins installed: []
JVM version: 1.8.0_172
OS version: MacOS (Darwin Kernel Version 15.6.0)
Description of the problem including expected versus actual behavior:
Returns the following error:
However, if you replace the path_match in the dynamic template to
prop1.prop2.*.field, it works as expected and matchesprop1.prop2.prop3.prop4.field.