# Performance for bool query and rescoring

**URL:** <https://discuss.elastic.co/t/performance-for-bool-query-and-rescoring/23943>\
**Category:** Elasticsearch\
**Created:** [June 18, 2015, 8:30pm UTC](https://discuss.elastic.co/t/performance-for-bool-query-and-rescoring/23943 "2015-06-18T20:30:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joeyliu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joeyliu/32/3405_2.png) [@joeyliu](https://discuss.elastic.co/u/joeyliu)\
**Post date:** [June 18, 2015, 8:30pm UTC](https://discuss.elastic.co/t/performance-for-bool-query-and-rescoring/23943/1 "2015-06-18T20:30:55Z")

</div>

Hello,

I have a question related to bool query and rescore, as the example below I'm using a `must` query for select documents and then use `should` to boost the score, does the `should` been only calculated on the results returned from `must`? If the `should` needs to be re-calculated against all documents again, is it wise to use `rescore` query in this case?

From all online examples people only use `rescore` on slow query like `match_phrase`, but if my index has huge amount of documents I'm wandering should I use `recore` on the `shingle` field?

Thank you.

```
GET my_index/description/_search
{
  "explain": true, 
  "query": {
    "bool": {
      "must": {
        "common": {
          "description": {
            "query": "test keywords bla bla",
            "minimum_should_match": {
               "low_freq": "50%",
               "high_freq": "75%"
            },
            "cutoff_frequency": 0.002,
            "boost": 3
          }
        }
      },
      "should": [
        {
          "multi_match": {
            "query": "test keywords bla bla",
            "fields": ["description.shingles", "description.origin"],
            "tie_breaker": 0.3
          }
        },
        {
          "term": {
            "hierarchy": "disorder"
          }
        },
        {
          "term": {
            "descriptionstatus": 0
          }
        }
      ]
    }
  }
}
```

---

<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, 12:06am UTC](https://discuss.elastic.co/t/performance-for-bool-query-and-rescoring/23943/2 "2017-07-06T00:06:38Z")

</div>


