You can do multiple things.
One is:
DELETE test
PUT test
{
"mappings": {
"properties": {
"attributes_text": {
"type": "nested",
"properties": {
"name": {
"type": "keyword"
},
"value": {
"type": "text"
}
}
},
"attributes_int": {
"type": "nested",
"properties": {
"name": {
"type": "keyword"
},
"value": {
"type": "integer"
}
}
}
}
}
}
Another idea which will require less fields:
DELETE test
PUT test
{
"mappings": {
"properties": {
"attributes": {
"type": "nested",
"properties": {
"name": {
"type": "keyword"
},
"value_text": {
"type": "text"
},
"value_int": {
"type": "integer"
}
}
}
}
}
}