Skip to content

Commit

Permalink
Updated opensearch-py to reflect the latest OpenSearch API spec (2024…
Browse files Browse the repository at this point in the history
…-12-07)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
saimedhi authored and github-actions[bot] committed Dec 7, 2024
1 parent 7815c6a commit 6be850b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added option to pass custom headers to 'AWSV4SignerAsyncAuth' ([863](https://github.com/opensearch-project/opensearch-py/pull/863))
- Added sync and async sample that uses `search_after` parameter ([859](https://github.com/opensearch-project/opensearch-py/pull/859))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@bbc0d9a](https://github.com/opensearch-project/opensearch-api-specification/commit/bbc0d9a2d0e19aaefe3ebefe9b0f994edb7f88ad)
### Changed
- Small refactor of AWS Signer classes for both sync and async clients ([866](https://github.com/opensearch-project/opensearch-py/pull/866))
### Deprecated
Expand Down
10 changes: 5 additions & 5 deletions opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ async def count(
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the `q` query
string parameter is specified.
Expand Down Expand Up @@ -855,7 +855,7 @@ async def delete_by_query(
:arg conflicts: What to do if delete by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -1225,7 +1225,7 @@ async def explain(
parameter can only be used when the `q` query string parameter is
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. Default is _all.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -2281,7 +2281,7 @@ async def search(
executing cross-cluster search (CCS) requests. Default is True.
:arg default_operator: The default operator for query string
query: AND or OR. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the q query
string parameter is specified.
Expand Down Expand Up @@ -2834,7 +2834,7 @@ async def update_by_query(
:arg conflicts: What to do if update by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down
9 changes: 7 additions & 2 deletions opensearchpy/_async/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ async def validate_query(
parameter can only be used when the `q` query string parameter is
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the `q` query
string parameter is specified.
Expand Down Expand Up @@ -1797,6 +1797,7 @@ async def recovery(
)
async def upgrade(
self,
body: Any = None,
index: Any = None,
params: Any = None,
headers: Any = None,
Expand Down Expand Up @@ -1832,7 +1833,11 @@ async def upgrade(
operation has completed before returning. Default is false.
"""
return await self.transport.perform_request(
"POST", _make_path(index, "_upgrade"), params=params, headers=headers
"POST",
_make_path(index, "_upgrade"),
params=params,
headers=headers,
body=body,
)

@query_params(
Expand Down
10 changes: 5 additions & 5 deletions opensearchpy/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def count(
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the `q` query
string parameter is specified.
Expand Down Expand Up @@ -855,7 +855,7 @@ def delete_by_query(
:arg conflicts: What to do if delete by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -1225,7 +1225,7 @@ def explain(
parameter can only be used when the `q` query string parameter is
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. Default is _all.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -2281,7 +2281,7 @@ def search(
executing cross-cluster search (CCS) requests. Default is True.
:arg default_operator: The default operator for query string
query: AND or OR. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the q query
string parameter is specified.
Expand Down Expand Up @@ -2834,7 +2834,7 @@ def update_by_query(
:arg conflicts: What to do if update by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down
9 changes: 7 additions & 2 deletions opensearchpy/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ def validate_query(
parameter can only be used when the `q` query string parameter is
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the `q` query
string parameter is specified.
Expand Down Expand Up @@ -1797,6 +1797,7 @@ def recovery(
)
def upgrade(
self,
body: Any = None,
index: Any = None,
params: Any = None,
headers: Any = None,
Expand Down Expand Up @@ -1832,7 +1833,11 @@ def upgrade(
operation has completed before returning. Default is false.
"""
return self.transport.perform_request(
"POST", _make_path(index, "_upgrade"), params=params, headers=headers
"POST",
_make_path(index, "_upgrade"),
params=params,
headers=headers,
body=body,
)

@query_params(
Expand Down

0 comments on commit 6be850b

Please sign in to comment.