# Importing Bucket Filters

**URL:** <https://discuss.elastic.co/t/importing-bucket-filters/52969>\
**Category:** Elasticsearch\
**Created:** [June 16, 2016, 9:00am UTC](https://discuss.elastic.co/t/importing-bucket-filters/52969 "2016-06-16T09:00:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kinny](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@Kinny](https://discuss.elastic.co/u/Kinny)\
**Post date:** [June 16, 2016, 9:00am UTC](https://discuss.elastic.co/t/importing-bucket-filters/52969/1 "2016-06-16T09:00:30Z")

</div>

Hi,

I am new to Elasticsearch and i've been playing around with the aggregation within the visualise section. I am trying to aggregate off key indicators (i have around 50 - 60) and its going to be something i want to repeat... Right now i have the metrics sorted to aggregate on certain fields and i have a bucket aggregation set to filters with a new filter for each key indicator... but adding them manually is a long process, is there a way to import them to the search?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2016, 9:17am UTC](https://discuss.elastic.co/t/importing-bucket-filters/52969/2 "2016-06-16T09:17:50Z")

</div>

Hey,

maybe you could reuse the [search template](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-template.html) feature for this kind of use-case?

--Alex

---

<div class="post-metadata">

**Author:** ![Kinny](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@Kinny](https://discuss.elastic.co/u/Kinny)\
**Post date:** [June 16, 2016, 10:59am UTC](https://discuss.elastic.co/t/importing-bucket-filters/52969/3 "2016-06-16T10:59:05Z")

</div>

Can you just add the arguments into a POST?

"aggs": {  
"2": {  
"filters": {  
"filters": {  
"84.2.3.1": {  
"query": {  
"query\_string": {  
"query": "84.2.3.1",  
"analyze\_wildcard": true  
}  
}  
},

---

<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:** [July 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/importing-bucket-filters/52969/4 "2017-07-05T22:43:17Z")

</div>

Closed on July 5, 2017, 10:43pm UTC


