This question is a continuation of the following question : https://discuss.elastic.co/t/filter-based-on-the-doc-count-with-aggregations/62677
When building aggregations in Kibana , I get the following output :
My question is , how can I filter by count?
For example : Build a visualization where "doc_count": 4
Or , how can I run this specific query ?
GET /cars/transactions/_search
{
"size": 0,
"aggs": {
"popular_colors": {
"terms": {
"field": "color"
},
"aggs": {
"my_filter": {
"bucket_selector": {
"buckets_path": {
"the_doc_count": "_count"
},
"script": "the_doc_count == 4"
}
}
}
}
}
}