How to reduce multiple conditions in ES

GET /logs*/_search
{
   "from":0,
   "query":{
      "bool":{
         "filter":[
            {
               "range":{
                  "@timestamp":{
                     "gte":"2020-02-10T11:13:19.7684961Z",
                     "lte":"2020-02-11T11:13:19.7684961Z"
                  }
               }
            }
         ],
         "must":[
            {
               "bool":{
                  "must_not":[
                     {
                        "match_phrase":{
                           "message":{
                              "query":"System32"
                           }
                        }
                     },
                     
                     {
                        "match_phrase":{
                           "message":{
                              "query":"212.118.14.45"
                           }
                        }
                     },
                 
                     {
                        "match_phrase":{
                           "message":{
                              "query":"  stopped state."
                           }
                        }
                     },
                     {
                        "match_phrase":{
                           "message":{
                              "query":"  running state"
                           }
                        }
                     },
                     {
                        "match_phrase":{
                           "message":{
                              "query":"  Share Name: \\\\*\\DLO-EBackup"
                           }
                        }
                     }
					 .
					 .
					 .
					 etc.,
					 .
					 .
					 .
					 .
					 .
                     {
                        "match_phrase":{
                           "message":{
                              "query":"WFO15Installation"
                           }
                        }
                     },
                     {
                        "match_phrase":{
                           "message":{
                              "query":"Windows\\SysWOW64"
                           }
                        }
                     },
                     {
                        "match_phrase":{
                           "message":{
                              "query":"Bitvise"
                           }
                        }
                     }
                  ]
               }
            }
         ]
      }
   },
   "size":10,
   "sort":[
      {
         "@timestamp":{
            "order":"desc"
         }
      }
   ]  
}

In the above query, I used multiple times match_phrase. how to reduce multiple match_phrase? because in production while querying to ES response is very slow.

Thank You !

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