diff --git a/connector_elasticsearch/tools/adapter.py b/connector_elasticsearch/tools/adapter.py index 948a44c2..5380b238 100644 --- a/connector_elasticsearch/tools/adapter.py +++ b/connector_elasticsearch/tools/adapter.py @@ -68,7 +68,12 @@ def _get_es_client(self): if backend.auth_type == "http": auth = (backend.es_user, backend.es_password) return elasticsearch.Elasticsearch( - [backend.es_server_host], http_auth=auth, use_ssl=backend.ssl + [backend.es_server_host], + http_auth=auth, + use_ssl=backend.ssl, + timeout=max(backend.es_timeout, 1), + retry_on_timeout=backend.es_retry_on_timeout, + max_retries=max(0, backend.es_max_retries), ) def test_connection(self):