Custom query for disjunction