Hi,
I have a nested object which is mapped as follow:
"product": {
"type": "nested",
"properties": {
"id": {
"type": "long"
}
"level": {
"type": "long"
}
"name": {
"type": "text"
}
}
I also have a dynamic template as follow to add "raw" as a keyword type to text data type:
"dynamic_templates": [
{
"strings_as_keywords": {
"match_mapping_type": "string",
"mapping": {
"fields": {
"raw": {
"ignore_above": 1024,
"type": "keyword"
}
},
"norms": false,
"type": "text"
}
}
}
...
Now my problem is, everything in this nested object works as expected except the nested aggregation over only text field (not the long data type). And that is because Fielddata is disabled on text fields and when I look at the _mapping of my created index I don't see the "raw" field as well.
So my question is, why the dynamic template works for all the others but not for this nested object? And what would you suggest to have both text/keyword in nested data type.
Thanks,
Maziyar