     (do
       (esd/put esconn index-name index-type (str (UUID/randomUUID)) {:timeline "vvmaciel"
                                                                      :text (str "texto orig es " n)
+                                                                     :created_at (.getTime (java.util.Date.))
                                                                      :sync false})
       (recur esconn (dec n)))))
 

  (let [hits (esGetNotSyncTweets esconn)]
    (es2cas esconn casconn hits)))


;; Cassandra
(defn casCreateKeyspaceDesafio [casconn]
  (cql/create-keyspace  casconn
                        keyspace-name

                            :sync :boolean
                            :primary-key [:id]}))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;              Elasticsearch
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn esCreateIndexDesafio [esconn]
  (esi/create esconn index-name :mappings mapping-types :settings {"number_of_shards" 1}))
