           (drop (* per-page (- target-page 1)) (:docs result)))))))
 
 (defn #^Document get-doc [reader doc-id]
+  "Reads the document with the provided doc-id from the index."
   (.document reader doc-id))
 
-(defn get-docs [reader docs]
-  (map #(get-doc reader (.doc %)) docs))
+(defn get-docs [reader score-docs]
+  "Returns a sequence of the individual documents for a Lucene ScoreDoc[]
+   array."
+  (map #(get-doc reader (.doc %)) score-docs))
 
 (defn document-to-map [document]
+  "Converts a Lucene document to a Vix document map."
   {:slug (.get document "slug")
    :title (.get document "title")
    :feed (.get document "feed")

      (QueryWrapperFilter. bq))))

(defn search
  ([query filter limit reader analyzer]
     (search query filter limit nil nil reader analyzer))
  ([query filter limit after-doc-id after-score reader analyzer]

    (IndexWriter. directory config)))

(defn #^IndexWriter close-index-writer [writer]
  "Closes the provided IndexWriter and writes the changes to disk (or RAM)."
  (doto writer
    (.close)))

(defmulti add-documents-to-index!
  "Supports adding documents to either a provided IndexWriter or
   through an IndexWriter created for the provided documents specifically."
  (fn [x documents] [(class x) (class documents)]))

(defmethod add-documents-to-index! [Directory Object] [directory documents]
  "Adds the documents to the index for the provided directory."
  (let [writer (create-index-writer (create-analyzer)
                                    directory
                                    :create-or-append)]
