# Why minimum\_should\_match does not return multiple match?

**URL:** <https://discuss.elastic.co/t/why-minimum-should-match-does-not-return-multiple-match/219680>\
**Category:** Elasticsearch\
**Created:** [February 17, 2020, 8:50pm UTC](https://discuss.elastic.co/t/why-minimum-should-match-does-not-return-multiple-match/219680 "2020-02-17T20:50:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fosiul\_Alam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fosiul_alam/32/43335_2.png) [@Fosiul\_Alam](https://discuss.elastic.co/u/Fosiul_Alam)\
**Post date:** [February 17, 2020, 8:50pm UTC](https://discuss.elastic.co/t/why-minimum-should-match-does-not-return-multiple-match/219680/1 "2020-02-17T20:50:57Z")

</div>

Hi All,

i am refering to this question [How to use "OR" in Dev Tool Query](https://stackoverflow.com/questions/59522942/how-to-use-or-in-dev-tool-query) While trying to extend this to 3 Match with a minimum should match number to 2 it does not return any when i set it like this ""minimum\_should\_match":1" its works, but only gives 1 match, but when i do like this ""minimum\_should\_match":2" then it does not return anything, where as i know the query should found minimum 2 match which are in the log

so what i am doing wrong ?

```auto
GET _search 
   { 
   "query":{ 
      "bool":{ 
         "must":[ 
           { 
               "match":{ 
                  "log.file.path":"mylog.log"
               }
            },
            { 
               "term":{ 
                  "GPS-LOG.IMEI":{ 
                     "value":"1234567"
                  }
               }
            },
            { 
               "bool":{ 
                  "should":[ 
                     { 
                        "term":{ 
                           "GPS-LOG.COMMAND":{ 
                              "value":"HB"
                           }
                        }
                     },
 "term":{ 
                           "GPS-LOG.COMMAND":{ 
                              "value":"DB"
                           }
                        }
                     },

                     { 
                        "term":{ 
                           "GPS-LOG.COMMAND":{ 
                              "value":"TR"
                           }
                        }
                     }
                  ],
                  "minimum_should_match":2
               }
            }
         ],
         "filter":{ 
            "range":{ 
               "@timestamp":{ 
                  "gte":"now-10m"
               }
            }
         }
      }
   }
}

```

---

<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:** [March 16, 2020, 8:51pm UTC](https://discuss.elastic.co/t/why-minimum-should-match-does-not-return-multiple-match/219680/2 "2020-03-16T20:51:12Z")

</div>

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