Hello,
I'm trying to give my _id a default data type so I'm defining a custom mapping for it.
PUT /test_index
{
"mappings": {
"product": {
"properties": {
"_id": {
"index": false,
"type": "keyword"
}
}
}
}
}
Error:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [product]: Field [_id] is defined twice in [product]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [product]: Field [_id] is defined twice in [product]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Field [_id] is defined twice in [product]"
}
},
"status": 400
}
The type "product" exists in other indices, however. Is this the expected behavior? Do I need to fix my mapping on every index that has the same "product" type?