Why minimum_should_match does not return multiple match?

Hi All,

i am refering to this question 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 ?

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"
               }
            }
         }
      }
   }
}

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