Hello,
i’m using DSL aggregations to extract some data from elasticsearch. The result of my query is the following :
"aggregations" : {
"IP_source" : {
"doc_count_error_upper_bound" : 83,
"sum_other_doc_count" : 4797,
"buckets" : [
{
"key" : "192.168.23.3",
"doc_count" : 698,
"IP_destination" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [ ]
}
},
{
"key" : "192.168.22.121",
"doc_count" : 696,
"IP_destination" : {
"doc_count_error_upper_bound" : 0,
"sum_other_doc_count" : 0,
"buckets" : [ ]
}
},
The buckets in the IP_destination part are empty as you can see in the code below.
I want to test if this bucket is empty or not. If it is empty then don’t display the IP_source aggregation entry in the bucket of IP_source aggregation.
Is there any method to do that?