Since you have the course object in hand, can you use its attributes to do the query below instead of splitting on the course_id? I ask mainly because someday in the not too distant future (when we start really using the split mongo store), course_ids won't necessarily follow the current format.