   (when-not (idx/exists? index)
     (idx/create index :mappings system-types)))
 
-(defn add 
-   "Adds a system into ES"
+(defn put
+   "Add/Update a system into ES"
    [id system]
   (doc/put index "system" id system))
 

  (:refer-clojure :exclude [get])
  (:require 
    [clojurewerkz.elastisch.native :as es]
    [clojurewerkz.elastisch.native.index :as idx]
    [clojurewerkz.elastisch.native.document :as doc])
  )

(def ^:const index "celestial-systems")


   "Grabs a system by an id"
   [id]
  (doc/get index "system" id))

(defn query 
   "basic query string" 
   [query]
  (doc/search index "system" :query query :fields ["owner" "env"])
  )
