       (QueryWrapperFilter. bq))))
 
 (defn search
+  "Runs a query (with or without a filter) and returns the result.
+   Also able to paginate when after-doc-id and after-score are provided.
+   See the unit tests for examples. The return value is a map with
+   :total-hits and :docs."
   ([query filter limit reader analyzer]
      (search query filter limit nil nil reader analyzer))
   ([query filter limit after-doc-id after-score reader analyzer]

          (drop (* per-page (- target-page 1)) (:docs result)))))))

(defn #^Document get-doc [reader doc-id]
  (.document reader doc-id))

(defn get-docs [reader docs]
  (map #(get-doc reader (.doc %)) docs))

(defn document-to-map [document]
  {:slug (.get document "slug")
   :title (.get document "title")
   :feed (.get document "feed")

     (= (class value) java.lang.Long) (.setLongValue field value)
     :default (.setIntValue field -1))))

(defn #^String distill-plaintext
  "Distills the text values from an HTML string.
   The value of each node is returned on a new line, followed by the
   values of the title attributes of all img nodes"
