Anyway to do this? I am new to ELK...
I would like to define: copy_to: {parentname}_all. Today I can only use {name} which does not allow the object of the parent to be referenced. I want to take fields and aggregate all children into a terms search. Kinda like _all but at the object level.
Here is an example: Note this is kinda useless, since I want to use {parentname}.
PUT /index2
{
"mappings": {
"_default_": {
"dynamic_templates": [
{
"nested_template": {
"path_match": "*.*",
"match_mapping_type": "string",
"mapping": {
"copy_to": "{name}_all",
"type": "string",
"index": "not_analyzed"
}
}
},
{
"nested2_template": {
"match": "*_all",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
},
{
"nested2_template": {
"path_unmatch": "*.*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
},
{
"notanalyzed": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
]
}
}
}