# Filter results of bucket

**URL:** <https://discuss.elastic.co/t/filter-results-of-bucket/144387>\
**Category:** Elasticsearch\
**Created:** [August 14, 2018, 6:32pm UTC](https://discuss.elastic.co/t/filter-results-of-bucket/144387 "2018-08-14T18:32:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snigdharao](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@snigdharao](https://discuss.elastic.co/u/snigdharao)\
**Post date:** [August 14, 2018, 6:32pm UTC](https://discuss.elastic.co/t/filter-results-of-bucket/144387/1 "2018-08-14T18:32:40Z")

</div>

is there way to filter results of backet like facet.prefix in solr.  
GET contracts/doc/\_search  
{  
"\_source": "commodity\_line",  
"size":0,

```
 "query":{
   "bool":{
     "must":{
       "match":{
         "commodity_line.keyword":"3"
         
       }
     }
     
   }
 },

         
          "aggs" : {
            "tag": {
              "terms" : { "field" : "commodity_line.keyword",
              
              "size":1000
               
              }
            }
          
      
   }
           
    
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 11, 2018, 6:32pm UTC](https://discuss.elastic.co/t/filter-results-of-bucket/144387/2 "2018-09-11T18:32:42Z")

</div>

Closed on September 11, 2018, 6:32pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
