combine initial index queries to perform only 1 pass