Wire up logic to get shards for a query.