I am having hard time to figure out how to use elsticsearch dis_max query with filters.
When I do this:
{
    "query": {
        "dis_max": {
            "queries": [{
                "multi_match": {}
            },
            { 
                "multi_match": {}
            }],
            "filter": {
                //Term filter
            }           
        }
    }
}
Its says [dis_max] query does not support [filter]. but I can use dis_max query with filtered aliases.
Ex: I create an alias with filter defined like below and use the same while doing dis_max query and it works perfectly.
 {
   "add" : {
       "index" : "test1",
       "alias" : "alias1",
       "filter" : { //Term filter }
    }
 }
So there should be someway to achieve this without creating aliases. can anyone please tell me how to do it.