   :action)
 
 (defmethod process :paths
-  [{{:keys [query]} :params :as request}]
-  (store/find-prefixes query))
+  [{{:keys [index query]} :params :as request}]
+  (path/search index "" (str query ".*")))
 
 (defmethod process :metrics
-  [{{:keys [from to path agg]} :params :keys [store rollups] :as request}]
+  [{{:keys [index from to path agg]} :params :keys [store rollups]}]
   (debug "fetching paths: " path)
   (if-let [{:keys [rollup period]} (find-best-rollup from rollups)]
     (let [to    (if to (Long/parseLong to) (now))
           from  (Long/parseLong from)
-          paths (mapcat (partial store/find-paths false)
+          paths (mapcat (partial path/search index "")
                         (if (sequential? path) path [path]))]
-      (store/fetch store (or agg "mean") paths rollup period from to))
+      (store/fetch store (or agg "mean") paths "" rollup period from to))
     {:step nil :from nil :to nil :series {}}))
 
 (defmethod process :ping

  (:require [aleph.http                 :as http]
            [ring.util.codec            :as codec]
            [org.spootnik.cyanite.store :as store]
            [cheshire.core              :as json]
            [lamina.core                :refer [enqueue]]
            [clojure.string             :refer [lower-case]]

(defn start
  "Start the API, handling each request by parsing parameters and
   routes then handing over to the request processor"
  [{:keys [http store carbon index] :as config}]
  (let [handler (fn [chan request]
                  (-> request
                      (assoc-params)
                      (assoc-route)
                      (wrap-process (:rollups carbon) chan store index)))]
    (http/start-http-server handler http))
  nil)
