Consolidate many repeated queries into one call to the filter