DELETE test
PUT test
{
"mappings": {
"doc": {
"dynamic": "strict",
"properties": {
"user": {
"type": "text"
}
}
}
}
}
PUT test/doc/1
{
"foo": "bar"
}
Gives:
{
"error": {
"root_cause": [
{
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [foo] within [doc] is not allowed"
}
],
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [foo] within [doc] is not allowed"
},
"status": 400
}
{
"error": {
"root_cause": [
{
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [foo] within [doc] is not allowed"
}
],
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [foo] within [doc] is not allowed"
},
"status": 400
}
{
"error": {
"root_cause": [
{
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [name] within [doc] is not allowed"
}
],
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [name] within [doc] is not allowed"
},
"status": 400
}
DELETE test
PUT test
{
"mappings": {
"doc": {
"dynamic": "strict",
"properties": {
"name": {
"type": "text"
}
}
}
}
}
PUT test/doc/1
{
"name": "OP",
"author": "er"
}
gives
{
"error": {
"root_cause": [
{
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [author] within [doc] is not allowed"
}
],
"type": "strict_dynamic_mapping_exception",
"reason": "mapping set to strict, dynamic introduction of [author] within [doc] is not allowed"
},
"status": 400
}
If you can't reproduce it please share a full formatted script as I just did so I can check it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.