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
…-06-24)

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
saimedhi committed Jun 24, 2024
1 parent d392807 commit 10c2649
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
### Fixed
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@7452827](https://github.com/opensearch-project/opensearch-api-specification/commit/745282767026703ea27967d2705633c3e2661c97)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@f2afd71](https://github.com/opensearch-project/opensearch-api-specification/commit/f2afd7171406c7477fbd644d74087bb0e2948c75)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@49cd814](https://github.com/opensearch-project/opensearch-api-specification/commit/49cd8140663f32f7c8b638ddc295683344edba61)
### Security
Expand Down
7 changes: 7 additions & 0 deletions opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,7 @@ async def scroll(
"analyze_wildcard",
"analyzer",
"batched_reduce_size",
"cancel_after_time_interval",
"ccs_minimize_roundtrips",
"default_operator",
"df",
Expand All @@ -2130,6 +2131,7 @@ async def scroll(
"include_named_queries_score",
"lenient",
"max_concurrent_shard_requests",
"phase_took",
"pre_filter_shard_size",
"preference",
"pretty",
Expand Down Expand Up @@ -2208,6 +2210,9 @@ async def search(
used as a protection mechanism to reduce the memory overhead per search
request if the potential number of shards in the request can be large.
Default is 512.
:arg cancel_after_time_interval: The time after which the search
request will be canceled.Request-level parameter takes precedence over
`cancel_after_time_interval` cluster setting.
:arg ccs_minimize_roundtrips: If true, network round-trips
between the coordinating node and the remote clusters are minimized when
executing cross-cluster search (CCS) requests. Default is True.
Expand Down Expand Up @@ -2253,6 +2258,8 @@ async def search(
concurrently.This value should be used to limit the impact of the search
on the cluster in order to limit the number of concurrent shard
requests. Default is 5.
:arg phase_took: Indicates whether to return phase-level `took`
time values in the response. Default is false.
:arg pre_filter_shard_size: Defines a threshold that enforces a
pre-filter roundtrip to prefilter search shards based on query rewriting
if the number of shards the search request expands to exceeds the
Expand Down
7 changes: 1 addition & 6 deletions opensearchpy/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ async def health(
"GET", "/_cat/health", params=params, headers=headers
)

@query_params(
"error_trace", "filter_path", "help", "human", "pretty", "s", "source"
)
@query_params("error_trace", "filter_path", "human", "pretty", "source")
async def help(
self,
params: Any = None,
Expand All @@ -423,13 +421,10 @@ async def help(
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg help: Return help information. Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg pretty: Whether to pretty format the returned JSON
response.
:arg s: Comma-separated list of column names or column aliases
to sort by.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
Expand Down
7 changes: 7 additions & 0 deletions opensearchpy/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,7 @@ def scroll(
"analyze_wildcard",
"analyzer",
"batched_reduce_size",
"cancel_after_time_interval",
"ccs_minimize_roundtrips",
"default_operator",
"df",
Expand All @@ -2130,6 +2131,7 @@ def scroll(
"include_named_queries_score",
"lenient",
"max_concurrent_shard_requests",
"phase_took",
"pre_filter_shard_size",
"preference",
"pretty",
Expand Down Expand Up @@ -2208,6 +2210,9 @@ def search(
used as a protection mechanism to reduce the memory overhead per search
request if the potential number of shards in the request can be large.
Default is 512.
:arg cancel_after_time_interval: The time after which the search
request will be canceled.Request-level parameter takes precedence over
`cancel_after_time_interval` cluster setting.
:arg ccs_minimize_roundtrips: If true, network round-trips
between the coordinating node and the remote clusters are minimized when
executing cross-cluster search (CCS) requests. Default is True.
Expand Down Expand Up @@ -2253,6 +2258,8 @@ def search(
concurrently.This value should be used to limit the impact of the search
on the cluster in order to limit the number of concurrent shard
requests. Default is 5.
:arg phase_took: Indicates whether to return phase-level `took`
time values in the response. Default is false.
:arg pre_filter_shard_size: Defines a threshold that enforces a
pre-filter roundtrip to prefilter search shards based on query rewriting
if the number of shards the search request expands to exceeds the
Expand Down
7 changes: 1 addition & 6 deletions opensearchpy/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ def health(
"GET", "/_cat/health", params=params, headers=headers
)

@query_params(
"error_trace", "filter_path", "help", "human", "pretty", "s", "source"
)
@query_params("error_trace", "filter_path", "human", "pretty", "source")
def help(
self,
params: Any = None,
Expand All @@ -423,13 +421,10 @@ def help(
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg help: Return help information. Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg pretty: Whether to pretty format the returned JSON
response.
:arg s: Comma-separated list of column names or column aliases
to sort by.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
Expand Down

0 comments on commit 10c2649

Please sign in to comment.