adding max_retries to elasticsearch backend