                 :hl.fragsize 300
                 :fl (create-field-param result-fields)
                 :facet true
-                :facet.field "author" ;; FIXME, cljs-ajax translates vector args into f[0], f[1] etc.
+                :facet.field (map csk/->snake_case_string facet-document-fields)
                 :facet.mincount 1}]
-    (if fields
-      (let [[field value] (first fields)]  ;; no multiple facet fields for now
-        (assoc params :fq (str (csk/->snake_case_string field) ":\"" value "\"")))
-      params)))
+    (assoc params :fq
+           (->> fields
+                (map (fn [[field values]]
+                       (map (fn [value]
+                              (str (csk/->snake_case_string field) ":\"" value "\"")))))
+                (concat)))))


(def result-fields [:id :title :author :categories :created-on])
(def document-fields [:id :title :body :author :categories :created-on])
(def facet-document-fields [:author :categories :created-on-year])

(defn create-field-param [fields]
  (string/join " " (map csk/->snake_case_string fields)))

(defn search-params [{:keys [text page page-size fields]}]
  (let [params {:q text

   (s/optional-key :body) s/Str ; search results don't have a body
   :categories (s/pred not-empty #{s/Str})})


(defn transform-doc [doc]
  (-> doc
