alexkruc commented on code in PR #24895:
URL: https://github.com/apache/airflow/pull/24895#discussion_r915789926


##########
airflow/providers/elasticsearch/hooks/elasticsearch.py:
##########
@@ -93,3 +95,53 @@ def get_uri(self) -> str:
                 uri += '&'
 
         return uri
+
+
+class ElasticsearchHook(ElasticsearchSQLHook):
+    """
+    This class is deprecated and was renamed to ElasticsearchSQLHook.
+    Please use 
`airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook`.
+    """
+
+    def __init__(self, *args, **kwargs):
+        warnings.warn(
+            """This class is deprecated.
+            Please use 
`airflow.providers.elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook`.""",
+            DeprecationWarning,
+            stacklevel=3,
+        )
+        super().__init__(*args, **kwargs)
+
+
+class ElasticsearchPythonHook(BaseHook):
+    """
+    Interacts with Elasticsearch. This hook uses the official Elasticsearch 
Python Client.
+
+    :param hosts: list: A list of a single or many Elasticsearch instances. 
Example: ["http://localhost:9200";]
+    :param es_conn_args: dict: Additional arguments you might need to enter to 
connect to Elasticsearch.
+                                Example: {"ca_cert":"/path/to/http_ca.crt", 
"basic_auth": "(user, pass)"}

Review Comment:
   I've added a new document for both hooks under hooks/elasticsearch.rst



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to