 
 (def class-label-key :class-label)
 
-(def stat-info-key :stat-info)
-
-(def ^:private dataset-key :dataset)
+(def ^:private dataset-index-name "dataset")
+
+(def ^:private stat-index-name "stat-info")
 
 (def ^:private es-class-label-key class-label-key)
 

  ([id]
   (use-connection
     (with-context [instance-context]
       (->> (es/document-by-id id)
            dataset-key)))))

(defn clear
  "Clear the in memory instance data.  If key `:wipe-persistent?` is `true` all

   :default-set-type (atom set-type)
   :population-use (atom population-use)
   :instance-context (es/create-context
                      index-name dataset-index-name
                      :url url
                      :settings {"index.mapping.ignore_malformed" true}
                      :mapping-type-defs
                      {dataset-index-name {:properties mapping-type-def}})
   :stats-context (es/create-context
                   index-name "stats"
                   :url url
                   :settings {"index.mapping.ignore_malformed" true}
                   :mapping-type-defs
                   {stat-index-name {:properties {:stats {:type "nested"}}}})
   :create-instances-fn create-instances-fn})

(defmacro with-connection
