plan

fun plan(context: String, aggregate: String, plan: QueryIndexPlan): List<MongoQueryIndex>

The indexes of the snapshot collection of aggregate in context: the two scope indexes, then those of plan, keyed by its keys' document paths. Fails on a second multi-valued key (MongoDB cannot index parallel arrays) and on a name the collection already uses.