# QueryStringQuery vs Filter Query

**URL:** <https://discuss.elastic.co/t/querystringquery-vs-filter-query/59714>\
**Category:** Elasticsearch\
**Created:** [September 2, 2016, 9:24pm UTC](https://discuss.elastic.co/t/querystringquery-vs-filter-query/59714 "2016-09-02T21:24:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EuclideanSearch](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@EuclideanSearch](https://discuss.elastic.co/u/EuclideanSearch)\
**Post date:** [September 2, 2016, 9:24pm UTC](https://discuss.elastic.co/t/querystringquery-vs-filter-query/59714/1 "2016-09-02T21:24:35Z")

</div>

I have a simple queryStringQuery that is much faster than (what I think is) an equivalent boolean query. Does anyone know why this might be in general? I am searching on approx 100 fields and am using wildcards as well (which explains slowness to me, but not the difference). Does anyone know why this might be?

---

<div class="post-metadata">

**Author:** ![1222kkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/1222kkk/32/23635_2.png) [@1222kkk](https://discuss.elastic.co/u/1222kkk)\
**Post date:** [September 5, 2016, 3:41am UTC](https://discuss.elastic.co/t/querystringquery-vs-filter-query/59714/2 "2016-09-05T03:41:47Z")

</div>

ES can store the result of the last query until the cache is full. So you may feel like this if you try to make the same query .

---

<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:22pm UTC](https://discuss.elastic.co/t/querystringquery-vs-filter-query/59714/3 "2017-07-05T22:22:34Z")

</div>


