   (let [client       (make-client)
         benchmark-fn (fn [filter-generator aggregation]
                        (let [t-start (System/nanoTime)
-                             result  (->> (filter-generator) aggregation (run-query client))
+                             result  (try
+                                       (->> (filter-generator) aggregation (run-query client))
+                                       (catch java.io.IOException e nil))
                              t-end   (System/nanoTime)]
                          {:took (- t-end t-start)
                         ; :result result
-                          :hits (-> result :body :hits :total)}))]
+                          :hits (some-> result :body :hits :total)}))]
     (apply run-benchmark benchmark-fn args)))
 
 (comment
-  (do (println "")
-      (clojure.pprint/pprint (benchmark-es filters aggregations 50 [1]))))
+  (let [results (benchmark-es filters aggregations 500 [1 2 4])]
+    (spit "results_es.edn" (with-out-str (clojure.pprint/pprint results)))
+    (println "")
+    (clojure.pprint/pprint results)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

                   _         (u/my-println "Finished " [filter-name aggregation-name n-parallel] " in " took " ms, avg " avg " ms")
                   
                   p-took    (->> results (map #(-> % :took (* 0.001) Math/round (* 0.001))) percentiles)
                   p-hits    (->> results (map :hits) percentiles)]
               {:n-parallel    n-parallel
                :filter        filter-name
                :aggs          aggregation-name

                                               (clojure.string/replace #"doc\['([^']+)'\]\.value" "$1")
                                               (clojure.string/replace #"([a-z])-([a-z])"         "$1_$2")))))
              
              gen-col-name (fn [name] (format "%s_%s_%s" field name (:interval agg-data)))
              
              this-agg  
              (if (group-by? agg-type)
