# Templates for Filters

**URL:** <https://discuss.elastic.co/t/templates-for-filters/26667>\
**Category:** Elasticsearch\
**Created:** [July 31, 2015, 10:41pm UTC](https://discuss.elastic.co/t/templates-for-filters/26667 "2015-07-31T22:41:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samillm](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@samillm](https://discuss.elastic.co/u/samillm)\
**Post date:** [July 31, 2015, 10:41pm UTC](https://discuss.elastic.co/t/templates-for-filters/26667/1 "2015-07-31T22:41:33Z")

</div>

Hi,

I'm new to elastic search. From what I understand there are two types of templates: Template Query & Search Template.  
Based on [this post](https://discuss.elastic.co/t/template-query-vs-search-template/20517/2) and their descriptions on the elastic reference doc. it looks like both are templates for queries.

Because filters have better performance than queries I want to create filter templates.

Is there some way to do this, I feel like there must be a way to using Template Query or Search Template.

Thanks!

---

<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, 11:57pm UTC](https://discuss.elastic.co/t/templates-for-filters/26667/2 "2017-07-05T23:57:56Z")

</div>


