Changed sleeps to refresh, problem was in mapping in elastic search.