From 194b0a708737297281d439c1e1216433ceb8bebf Mon Sep 17 00:00:00 2001 From: saimedhi Date: Tue, 23 Apr 2024 03:34:14 +0000 Subject: [PATCH] Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-23) Signed-off-by: GitHub --- CHANGELOG.md | 1 + opensearchpy/_async/client/__init__.py | 8 ++++---- opensearchpy/_async/client/cluster.py | 10 +++++----- opensearchpy/_async/client/indices.py | 14 ++++++++------ opensearchpy/_async/client/snapshot.py | 2 +- opensearchpy/client/__init__.py | 8 ++++---- opensearchpy/client/cluster.py | 10 +++++----- opensearchpy/client/indices.py | 14 ++++++++------ opensearchpy/client/snapshot.py | 2 +- 9 files changed, 37 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45b37704..e1b5ce7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Updated code generator to use native OpenAPI specification ([#721](https://github.com/opensearch-project/opensearch-py/pull/721)) ### Updated APIs +- Updated opensearch-py APIs to reflect [opensearch-api-specification@af4a34f](https://github.com/opensearch-project/opensearch-api-specification/commit/af4a34f9847d36709b5a394be7c76fda4649ccc8) - Updated opensearch-py APIs to reflect [opensearch-api-specification@e02c076](https://github.com/opensearch-project/opensearch-api-specification/commit/e02c076ef63f7a9b650ca1416380120cc640620a) - Updated opensearch-py APIs to reflect [opensearch-api-specification@fe6f977](https://github.com/opensearch-project/opensearch-api-specification/commit/fe6f977bcae4e27a2b261fb9599884df5606c0bc) - Updated opensearch-py APIs to reflect [opensearch-api-specification@29faff0](https://github.com/opensearch-project/opensearch-api-specification/commit/29faff0709b2557acfd4c3c7e053a2c313413633) diff --git a/opensearchpy/_async/client/__init__.py b/opensearchpy/_async/client/__init__.py index 9792ef81..abca3067 100644 --- a/opensearchpy/_async/client/__init__.py +++ b/opensearchpy/_async/client/__init__.py @@ -846,7 +846,7 @@ async def delete_by_query( `open`, `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg from_: Starting offset (default: 0) Default is 0. + :arg from_: Starting offset. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -1923,8 +1923,8 @@ async def reindex( the response. :arg human: Whether to return human readable values for statistics. - :arg max_docs: Maximum number of documents to process (default: - all documents). + :arg max_docs: Maximum number of documents to process. By + default, all documents. :arg pretty: Whether to pretty format the returned JSON response. :arg refresh: If `true`, the request refreshes affected shards @@ -2765,7 +2765,7 @@ async def update_by_query( `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg from_: Starting offset (default: 0) Default is 0. + :arg from_: Starting offset. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an diff --git a/opensearchpy/_async/client/cluster.py b/opensearchpy/_async/client/cluster.py index 4c4cc78a..04682b26 100644 --- a/opensearchpy/_async/client/cluster.py +++ b/opensearchpy/_async/client/cluster.py @@ -222,14 +222,14 @@ async def state( open, closed, hidden, none. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master @@ -437,8 +437,8 @@ async def put_settings( errors. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg master_timeout (Deprecated: To promote inclusive language, diff --git a/opensearchpy/_async/client/indices.py b/opensearchpy/_async/client/indices.py index 139e9df5..66e4e60f 100644 --- a/opensearchpy/_async/client/indices.py +++ b/opensearchpy/_async/client/indices.py @@ -1213,12 +1213,12 @@ async def exists_template( errors. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -1970,13 +1970,15 @@ async def forcemerge( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flush: Specify whether the index should be flushed after - performing the operation (default: true) Default is True. + performing the operation. Default is True. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) - :arg max_num_segments: The number of segments the index should - be merged into (default: dynamic) + :arg max_num_segments: The number of larger segments into which + smaller segments are merged.Set this parameter to 1 to merge all + segments into one segment.The default behavior is to perform the merge + as necessary. :arg only_expunge_deletes: Specify whether the operation should only expunge deleted documents :arg pretty: Whether to pretty format the returned JSON diff --git a/opensearchpy/_async/client/snapshot.py b/opensearchpy/_async/client/snapshot.py index 79d8de65..80813d16 100644 --- a/opensearchpy/_async/client/snapshot.py +++ b/opensearchpy/_async/client/snapshot.py @@ -289,7 +289,7 @@ async def get_repository( :arg human: Whether to return human readable values for statistics. :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node diff --git a/opensearchpy/client/__init__.py b/opensearchpy/client/__init__.py index 0442bad1..c43b54a2 100644 --- a/opensearchpy/client/__init__.py +++ b/opensearchpy/client/__init__.py @@ -846,7 +846,7 @@ def delete_by_query( `open`, `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg from_: Starting offset (default: 0) Default is 0. + :arg from_: Starting offset. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -1923,8 +1923,8 @@ def reindex( the response. :arg human: Whether to return human readable values for statistics. - :arg max_docs: Maximum number of documents to process (default: - all documents). + :arg max_docs: Maximum number of documents to process. By + default, all documents. :arg pretty: Whether to pretty format the returned JSON response. :arg refresh: If `true`, the request refreshes affected shards @@ -2765,7 +2765,7 @@ def update_by_query( `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg from_: Starting offset (default: 0) Default is 0. + :arg from_: Starting offset. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an diff --git a/opensearchpy/client/cluster.py b/opensearchpy/client/cluster.py index 2988c8ea..159aea49 100644 --- a/opensearchpy/client/cluster.py +++ b/opensearchpy/client/cluster.py @@ -222,14 +222,14 @@ def state( open, closed, hidden, none. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master @@ -437,8 +437,8 @@ def put_settings( errors. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg master_timeout (Deprecated: To promote inclusive language, diff --git a/opensearchpy/client/indices.py b/opensearchpy/client/indices.py index 27894be0..6d07837b 100644 --- a/opensearchpy/client/indices.py +++ b/opensearchpy/client/indices.py @@ -1213,12 +1213,12 @@ def exists_template( errors. :arg filter_path: Comma-separated list of filters used to reduce the response. - :arg flat_settings: Return settings in flat format (default: - false) Default is false. + :arg flat_settings: Return settings in flat format. Default is + false. :arg human: Whether to return human readable values for statistics. :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -1970,13 +1970,15 @@ def forcemerge( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flush: Specify whether the index should be flushed after - performing the operation (default: true) Default is True. + performing the operation. Default is True. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) - :arg max_num_segments: The number of segments the index should - be merged into (default: dynamic) + :arg max_num_segments: The number of larger segments into which + smaller segments are merged.Set this parameter to 1 to merge all + segments into one segment.The default behavior is to perform the merge + as necessary. :arg only_expunge_deletes: Specify whether the operation should only expunge deleted documents :arg pretty: Whether to pretty format the returned JSON diff --git a/opensearchpy/client/snapshot.py b/opensearchpy/client/snapshot.py index 294fd323..2f0cd1d7 100644 --- a/opensearchpy/client/snapshot.py +++ b/opensearchpy/client/snapshot.py @@ -289,7 +289,7 @@ def get_repository( :arg human: Whether to return human readable values for statistics. :arg local: Return local information, do not retrieve the state - from cluster-manager node (default: false) Default is false. + from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node