Hi, I have a filter script inside an Aggregation. Inside this script i would like to access the key from the outer Aggregation. Is this possible?
"aggs": {
"category": {
"terms": {
"field": "category",
"size": 20
},
"aggs": {
"my_filter": {
"filter": {
"script": {
"lang": "painless",
"inline": "if(category_key == 'phone'){do something}else{do something else}"
}
}
}
}
}
}
Thanks!