            (javax.mail Session Message$RecipientType))
   (:require [net.dishevelled.mailindex.fieldpool :as fieldpool])
   (:use clojure.java.io
-        clojure.string
+        [clojure.string :only [join]]
         clojure.contrib.seq
         clojure.contrib.def)
 
   (:gen-class))
 
 
-(def *date-output-format*
+(def date-output-format
      (doto (SimpleDateFormat. "EEE, dd MMM yyyy HH:mm:ss Z")
        (.setTimeZone (SimpleTimeZone. 0 "UTF"))))
 
 
-(def *date-formatters*
+(def date-formatters
      (map #(doto (SimpleDateFormat. %)
              (.setTimeZone (SimpleTimeZone. 0 "UTF")))
           ["EEE, dd MMM yyyy"

    (when-let [terms (seq (set (map #(.getTerm %)
                                    (QueryTermExtractor/getTerms
                                     (.rewrite query reader)))))]
      (doseq [field (keys *parse-rules*)]
        (let [boolean-or (BooleanQuery.)
              boolean-and (BooleanQuery.)]


        (doseq [connection connections]
          (do-deletes connection indexfile))
        (do-optimize indexfile)))
    (Thread/sleep (:reindex-frequency @config))
    (catch Throwable e
      (error "%s" e)
      (.printStackTrace e)))
  (send-off agent start-indexing indexfile connections))



