Hi,
I have created an index in elasticsearch 7.6. The mapping is as follows:
{
"employee_202005011710": {
"mappings": {
"properties": {
"employee": {
"properties": {
"name": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "simple"
},
"department": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "simple"
},
"designation": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
},
"analyzer": "simple"
}
}
}
}
}
}
}
I have a python code that performs a bulk insert into this index. However I am getting the following error when the insert is performed:
{"_index":"employee_202005011710","_type":"employee","_id":"lZWw0XEBHjlZM_lHtKQq","status":400,"error":{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [employee_202005011710] as the final mapping would have more than 1 type: [_doc, employee]"}}}
Can someone tell me what is causing this exception?