     (if (.isDirectory f)
       (get-search-manager (.getName f)))))
 
-(defn use-search-manager [name f]
+(defn use-searcher-from-search-manager [name f]
   (let [manager (get-search-manager name)
         searcher (.acquire manager)]
     (try



(defn search [name query size]
  (use-search-manager name (fn [searcher]
                             (let [parser (QueryParser. *version* "_default_" *analyzer*)
                                   query (.parse parser query)
                                   hits (.search searcher query (int size))

(ns bzzz.core
  (use ring.adapter.jetty)
  (use overtone.at-at)
  (use clojure.stacktrace)
  (:require [clojure.data.json :as json])
  (:import (java.io StringReader File)
           (org.apache.lucene.analysis Analyzer TokenStream)
