 
 (defsafe create-raw-index!
   []
-  (let [raw-db (mg/get-db (get-dep :raw-db-connection) (env :raw-db-name))]
+  (let [raw-db (get-raw-db)]
     (mc/ensure-index raw-db "subtitle" (array-map :url 1) {:uniquer true})))
 
 (defn prepare-to-index

(defsafe create-document!
  "Put document into elastic"
  [doc]
  (let [raw-db (mg/get-db (get-dep :raw-db-connection) (env :raw-db-name))]
    (mc/insert raw-db "subtitle" doc))
  (esd/create (get-dep :db-connection)
              (env :index-name) "subtitle" (prepare-to-index doc)))

(defn in-db
  "Check subtitle already in db"
  [subtitle]
  (mc/any? (get-raw-db) "subtitle" {:url (:url subtitle)}))

(defn list-languages
  "List languages with count"
