Hello,
how can i visualize the output query below?
{
"query" : {
"match": {
"flag_bar": 1
}
},
"aggs": {
"for_mun":{
"terms":{
"field":"mun"
, "order": {
"_term": "asc"
}
},
"aggs" : {
"numero_seg" : { "sum" : { "field" : "flag_bar" } },
"numero_abi" : { "sum" : { "field" : "flag_ana" } },
"numero_int" : { "sum" : { "field" : "flag_int" } },
"division": {
"bucket_script": {
"buckets_path": {
"my_var1": "numero_seg",
"my_var2": "numero_int"
},
"script": "params.my_var1 / params.my_var2"
}
}
}
}
}
}
I want to as how create data table with two column: "for_mun" and "division".
It's possible?
Thanks