       (recur conn (:_scroll_id scroll-response) (concat results hits))
       (concat results hits))))
 
-(defn getNotSyncTweets [esconn]
+(defn esGetNotSyncTweets [esconn]
   (let [response     (esd/search esconn index-name index-type
                                  :query (q/term :sync false)
                                  :search_type "query_then_fetch"

(ns desafio.core
  (:require [clojurewerkz.cassaforte.client :as cas]
            [clojurewerkz.cassaforte.cql :as cql]
            [clojurewerkz.elastisch.rest :as esr]
            [clojurewerkz.elastisch.rest.index :as esi]
            [clojurewerkz.elastisch.query :as q]

(defn esDeleteIndexDesafio[esconn]
  (esi/delete esconn index-name))

(defn esPutRandomTweets [esconn n]
  (if (pos? n)
    (do
      (esd/put esconn index-name index-type (str (UUID/randomUUID)) {:timeline "vvmaciel"
                                                                     :text (str "texto orig es " n)
                                                                     :sync false})
      (recur esconn (dec n)))))

(defn esCountTweets [esconn]
  (:count (esd/count esconn index-name index-type)))

(defn esDeleteAllTweets[esconn]
  (esd/delete-by-query esconn index-name index-type (q/match-all)))

(defn fetch-scroll-results [conn scroll-id results]
