# Terms filter execution mode

**URL:** https://discuss.elastic.co/t/terms-filter-execution-mode/18077
**Category:** Elasticsearch
**Created:** [June 12, 2014, 6:49pm UTC](https://discuss.elastic.co/t/terms-filter-execution-mode/18077 "2014-06-12T18:49:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Valery\_Ayala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valery_ayala/32/75433_2.png) [@Valery\_Ayala](https://discuss.elastic.co/u/Valery_Ayala)
#### Post date: [June 12, 2014, 6:49pm UTC](https://discuss.elastic.co/t/terms-filter-execution-mode/18077/1 "2014-06-12T18:49:56Z")

</div>

I'm trying to understand the different execution modes for the terms  
filter.  
([http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-terms-filter.html#\_execution\_mode](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-terms-filter.html#_execution_mode))

And/Or execution modes seem self-explanatory.  
The "bool" execution mode says "Generates a term filter (which is cached)  
for each term, and wraps those in a bool filter. The bool filter itself is  
not cached as it can operate very quickly on the cached term filters."  
A bool filter, however, has more than one field for filter expressions  
within it. Where do the generated term filters actually go? Into the  
"must" section or "should" section? Is this configurable? (  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-filter.html#query-dsl-bool-filter](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-filter.html#query-dsl-bool-filter))  
Or am I completely misunderstanding something?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/65edf05c-5a53-48a2-9107-6c3f1d9d74ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65edf05c-5a53-48a2-9107-6c3f1d9d74ef%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:22am UTC](https://discuss.elastic.co/t/terms-filter-execution-mode/18077/2 "2017-07-06T01:22:56Z")

</div>


