I'm having a problem with using strict dynamic mapping and multi-field
values. My multi fields work fine when I don't have StrictDynamicMapping
enabled but when I enable it I get the error
"error": "StrictDynamicMappingException[mapping set to strict, dynamic
introduction of [email.downcased] within [External::User] is not allowed]"
The significant part of my index request looks something like this
PUT /test_app_9/External::User/12
{
"email": "john@john.com",
"email.downcased": "john@john.com",
"name": "John Doe",
"name.downcased": "john doe",
"browser_locale": "en",
.... all other attributes
}
and the significant part of my mapping is as below. What am I doing wrong?
"mappings": {
"External::User": {
"dynamic": "strict",
"dynamic_templates": [
{
"string_custom_data": {
"mapping": {
"type": "multi_field",
"fields": {
"{name}": {
"index": "no",
"type": "string"
},
"downcased": {
"index": "not_analyzed",
"type": "string"
}
}
},
"match": "*_string"
}
},
{
"date_custom_data": {
"mapping": {
"type": "date"
},
"match": "*_date"
}
}
],
"_all": {
"enabled": false
},
"properties": {
"app_id": {
"type": "integer"
},
"browser_locale": {
"type": "string",
"index": "no",
"fields": {
"downcased": {
"type": "string",
"index": "not_analyzed"
}
}
},
"email": {
"type": "string",
"index": "no",
"fields": {
"downcased": {
"type": "string",
"index": "not_analyzed"
}
}
},
.....
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/826c34f9-cc1c-4cea-abea-fdaf7a2d40cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.