Building filters, part 1: determining the right queries