Mapping a query to a set of buckets.