I'm wondering if there is a way to set all nested field to a specific type
The main reason I'm looking for something like that is because the attributes inside category are not not known and can vary.
That's the mapping I have, and every single property must have its type explicitly set:
PUT data
{
"mappings": {
"properties": {
"category": {
"type": "nested",
"properties": {
"mode": {
"type": "text",
"analyzer": "keyword"
},
"sequence": {
"type": "text",
"analyzer": "keyword"
}
}
}
}
}
}
I'm looking for something like this pseudo mapping below:
PUT data
{
"mappings": {
"properties": {
"category": {
"type": "nested",
"properties.*": {
"type": "text",
"analyzer": "keyword"
}
}
}
}
}
Maybe this is not the way to go and if you have any other solution to handle these dynamic attributes, it will be really appreciated.