Skip to content

Commit

Permalink
Use OpenSearch instead of Open Search and Opensearch (apache#35821
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Taragolis authored Nov 23, 2023
1 parent ca1202f commit eb691fc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions airflow/providers/opensearch/hooks/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class OpenSearchHook(BaseHook):
"""
Provide a thin wrapper around the OpenSearch client.
:param open_search_conn_id: Connection to use with Open Search
:param log_query: Whether to log the query used for Open Search
:param open_search_conn_id: Connection to use with OpenSearch
:param log_query: Whether to log the query used for OpenSearch
"""

conn_name_attr = "opensearch_conn_id"
Expand Down Expand Up @@ -107,11 +107,11 @@ def delete(self, index_name: str, query: dict | None = None, doc_id: int | None

@staticmethod
def get_ui_field_behaviour() -> dict[str, Any]:
"""Returns custom UI field behaviour for Open Search Connection."""
"""Returns custom UI field behaviour for OpenSearch Connection."""
return {
"hidden_fields": ["schema"],
"relabeling": {
"extra": "Open Search Configuration",
"extra": "OpenSearch Configuration",
},
"placeholders": {
"extra": json.dumps(
Expand Down
6 changes: 3 additions & 3 deletions airflow/providers/opensearch/operators/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class OpenSearchQueryOperator(BaseOperator):
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:OpenSearchQueryOperator`
:param query: A Dictionary Open Search DSL query.
:param query: A Dictionary OpenSearch DSL query.
:param search_object: A Search object from opensearch-dsl.
:param index_name: The name of the index to search for documents.
:param opensearch_conn_id: opensearch connection to use
Expand Down Expand Up @@ -97,7 +97,7 @@ def execute(self, context: Context) -> Any:

class OpenSearchCreateIndexOperator(BaseOperator):
"""
Create a new index on an Open Search cluster with a given index name.
Create a new index on an OpenSearch cluster with a given index name.
.. seealso::
For more information on how to use this operator, take a look at the guide:
Expand Down Expand Up @@ -127,7 +127,7 @@ def hook(self) -> OpenSearchHook:
return OpenSearchHook(open_search_conn_id=self.opensearch_conn_id, log_query=False)

def execute(self, context: Context) -> Any:
"""Creates an index on an Open Search cluster."""
"""Creates an index on an OpenSearch cluster."""
try:
self.hook.client.indices.create(index=self.index_name, body=self.index_body)
except OpenSearchException as e:
Expand Down
10 changes: 5 additions & 5 deletions airflow/providers/opensearch/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

---
package-name: apache-airflow-providers-opensearch
name: Opensearch
name: OpenSearch
description: |
`Opensearch <https://opensearch.org/>`__
`OpenSearch <https://opensearch.org/>`__
suspended: false
source-date-epoch: 1700148078
Expand All @@ -31,20 +31,20 @@ dependencies:
- opensearch-py>=2.2.0

integrations:
- integration-name: Opensearch
- integration-name: OpenSearch
external-doc-url: https://opensearch.org/
how-to-guide:
- /docs/apache-airflow-providers-opensearch/operators/opensearch.rst
logo: /integration-logos/opensearch/opensearch.png
tags: [software]

hooks:
- integration-name: Opensearch
- integration-name: OpenSearch
python-modules:
- airflow.providers.opensearch.hooks.opensearch

operators:
- integration-name: Opensearch
- integration-name: OpenSearch
python-modules:
- airflow.providers.opensearch.operators.opensearch

Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-opensearch/commits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Package apache-airflow-providers-opensearch
------------------------------------------------------

`Opensearch <https://opensearch.org/>`__
`OpenSearch <https://opensearch.org/>`__


This is detailed commit list of changes for versions provider package: ``opensearch``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The OpenSearch connection provides credentials for an OpenSearch instance.
Configuring the Connection
--------------------------
Host (required)
The host address of the Open Search instance.
The host address of the OpenSearch instance.
Login (required)
The login user.
Password (required)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Open Search Operators
OpenSearch Operators
======================


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Operators

.. _howto/operator:OpenSearchCreateIndexOperator:

Create an Index in Open Search
==============================
Create an Index in OpenSearch
=============================

Use :class:`~airflow.providers.opensearch.operators.opensearch.OpenSearchCreateIndexOperator`
to create a new index in an Open Search domain.
to create a new index in an OpenSearch domain.



Expand All @@ -45,10 +45,10 @@ to create a new index in an Open Search domain.
.. _howto/operator:OpenSearchAddDocumentOperator:

Add a Document to an Index on OpenSearch
=========================================
========================================

Use :class:`~airflow.providers.opensearch.operators.opensearch.OpenSearchAddDocumentOperator`
to add single documents to an Open Search Index
to add single documents to an OpenSearch Index

.. exampleinclude:: /../../tests/system/providers/opensearch/example_opensearch.py
:language: python
Expand All @@ -59,11 +59,11 @@ to add single documents to an Open Search Index

.. _howto/operator:OpenSearchQueryOperator:

Run a query against an Open Search Index
=========================================
Run a query against an OpenSearch Index
=======================================

Use :class:`~airflow.providers.opensearch.operators.opensearch.OpenSearchQueryOperator`
to run a query against an Open Search index.
to run a query against an OpenSearch index.

.. exampleinclude:: /../../tests/system/providers/opensearch/example_opensearch.py
:language: python
Expand Down

0 comments on commit eb691fc

Please sign in to comment.