# Minimum\_should\_match percentage rounding

**URL:** <https://discuss.elastic.co/t/minimum-should-match-percentage-rounding/301662>\
**Category:** Elasticsearch\
**Created:** [April 5, 2022, 7:01pm UTC](https://discuss.elastic.co/t/minimum-should-match-percentage-rounding/301662 "2022-04-05T19:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bews](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bews/32/103991_2.png) [@bews](https://discuss.elastic.co/u/bews)\
**Post date:** [April 5, 2022, 7:01pm UTC](https://discuss.elastic.co/t/minimum-should-match-percentage-rounding/301662/1 "2022-04-05T19:01:15Z")

</div>

Situation: I have a bool query with N 'should' conditions and I want to let it ignore 1 of those.

Before in ES version 6 (iirc) this was achieved with 'minimum\_should\_match' =\> '99%', but now on version 8.1.1 this doesn't work anymore.  
Which is strange, because [doc](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html) says

> Indicates that this percent of the total number of optional clauses are necessary. The number computed from the percentage is rounded down and used as the minimum.

So if I have 2 conditions with 99% it should be rounded down to 1 and give me the expected result, but in reality it doesn't happen. To make this work now I have to use 'minimum\_should\_match' =\> '49%' to get the desired result.

So 2 questions:  
Does ES works differently now and docs are just not updated or is it a bug?  
How to make it ignore 1 condition? (bc 49% will work with 2 total conditions, but with more it will ignore more than 1)

Edit: Also found [this explanation](https://medium.com/@d_deboer/thanks-for-your-kind-words-jason-joseph-5fb0719b9a1e), but it doesn't work like that anymore, bc in that example 75% will force all 3 now.

---

<div class="post-metadata">

**Author:** ![bews](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bews/32/103991_2.png) [@bews](https://discuss.elastic.co/u/bews)\
**Post date:** [April 5, 2022, 7:42pm UTC](https://discuss.elastic.co/t/minimum-should-match-percentage-rounding/301662/2 "2022-04-05T19:42:06Z")

</div>

Turns out one of my conditions never works anymore bc it uses "\_type" field that no longer exist.  
This should be closed.

---

<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:** [May 3, 2022, 7:42pm UTC](https://discuss.elastic.co/t/minimum-should-match-percentage-rounding/301662/3 "2022-05-03T19:42:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
