Hi,
How can I aggregate to return value as True if doc_count != 0 and False if doc_count == 0 in Kibana response?
Below is my query
{
"query": {
"range": {
"timestamp": {
"gte": "now-1h/h"
}
}
},
"size": 0,
"aggs": {
"get_cmtsId": {
"terms": {
"field": "cmtsId",
"size": 2
},
"aggs": {
"every30min": {
"date_histogram": {
"field": "timestamp",
"fixed_interval": "30m"
},
"aggs": {
"my_filter": {
"bucket_selector": {
"buckets_path": {
"the_doc_count": "_count"
},
"script": "params.the_doc_count != 0"
}
}
}
}
}
}
}
}