Add a filter in ES query to improve efficiency