I have "routes" field as long type (Im storing array of values in that Example  1. [5463, 3452] , 2. [5467, 3452]) in mapping. In the following query i 
want to retrieve data which matches both 5463, 3452 in same record
GET /flight_routes/_search
{
    "query": {
    "bool": {
    "filter": {
        "terms": {
          "routes": [5463, 3452]
        }
      }
    }
    }
}
But it is returning document which matches with either one value. Should I have to migrate the mapping type to nested to handle this or any other way to get it through query itself?