                 :properties {:tenant {:type "string" :index "not_analyzed"}
                              :path {:type "string" :index "not_analyzed"}}}})
 
-(defn get-all-paths
+(defn- get-all-paths
   "Get all paths."
   [tenant path]
   (let [parts (str/split path #"\.")

            [clojurewerkz.elastisch.rest.document :as esrd]
            [clojure.tools.logging :as log]
            [whisper2cyanite.logging :as wlog]))

(def ^:const default-es-index "cyanite_paths")
(def ^:const es-def-type "path")

      PathStore
      (insert [this tenant path]
        (try
          (dorun (map #(let [id (constuct-id (:tenant %) (:path %))]
                         (when-not (exists-fn id)
                           (update-fn id %)))
                      (get-all-paths tenant path)))
          (catch Exception e
            (wlog/error "Path store error: " e))))
      (exist? [this tenant path]
        (try
          (exists-fn (constuct-id tenant path))
          (catch Exception e
            (wlog/error "Path store error: " e))))
      (shutdown [this]
