       (get index-oir attr))
     #{}))
 
-(defn compute-paths2 [index-oir keys attr]
-  (into #{} (map rseq) (compute-paths2* index-oir keys attr #{attr})))
-
-(defn path-cost [weights path]
+(defn compute-paths [index-oir keys attr]
+  (into #{} (map rseq) (compute-paths* index-oir keys attr #{attr})))
+
+(defn path-cost [_env weights path]
   (transduce (map #(get weights % 0)) + path))
 
 (defn resolve-plan [{::keys [indexes resolver-weights] :as env}]
   (let [key     (-> env :ast :key)
         weights (or (some-> resolver-weights deref) {})]
-    (->> (compute-paths2 (::index-oir indexes) (set (keys (p/entity env))) key)
-         (sort-by #(path-cost weights %)))))
+    (->> (compute-paths (::index-oir indexes) (set (keys (p/entity env))) key)
+         (sort-by #(path-cost env weights %)))))
 
 (defn plan->output [env plan]
   (let [index-resolvers (get-in env [::indexes ::index-resolvers])]

                missing   (set/difference input keys)]
            (if (seq missing)
              (let [missing-paths (->> missing
                                       (into #{} (mapcat #(compute-paths2* index-oir keys % (into pending missing)))))]
                (if (seq missing-paths)
                  (into paths (->> (combo/cartesian-product new-paths missing-paths)
                                   (mapv #(into (first %) (second %)))))

(defn expand-index-entry [index-entry]
  (reduce-kv (fn [m k v] (merge m (zipmap k (repeat v)))) {} index-entry))

(defn compute-paths* [index-oir keys attr pending]
  (if (contains? index-oir attr)
    (reduce-kv
      (fn [paths input resolvers]
