             [om-tools.core :refer-macros [defcomponent]]
             [sablono.core :as html :refer-macros [html]]
             [cljs.core.async :refer [put! <! >! chan timeout close!]]
-            [searchbot.es :refer [es-agg filtered-agg get-agg-buckets flatten-agg-buckets]]
+            [searchbot.es :refer [es-agg filtered-agg]]
             [searchbot.input.labels :as labels]
             [searchbot.charts :refer [es-chart]]
             [searchbot.chart.metricgraphics :as mg]))

                 :svg nil
                 :parsets-data []
                 :highlighted {}
                 :show-dimensions (get-in opts [:dimensions :show])
                 :show-dimensions? #(:show-dimensions (om/get-state owner))}))
  (will-mount [_]
              (do-parsets-agg owner))
  (render-state [_ {:keys [parsets-agg get-agg-terms parsets-data show-dimensions]}]

  (vec (flatten (walk-buckets <-buckets agg-result {} steps value-path))))

(defn- ->query
  [{:keys [agg-terms sub-aggs filters default-filter size] :or {size 5}}]
  (let [agg-query (build-parsets-agg {:terms (reverse agg-terms) :sub-aggs sub-aggs :size size})
        agg-query (filtered-agg (merge {:body agg-query}
                                 (merge {:filter default-filter}
