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
…-11-28)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
saimedhi authored and github-actions[bot] committed Nov 28, 2024
1 parent b9e48dc commit 0c2c315
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Deprecated
### Removed
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@c400057](https://github.com/opensearch-project/opensearch-api-specification/commit/c400057d94d5e034c9457b32d175d1e3e6439c26)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@4615564](https://github.com/opensearch-project/opensearch-api-specification/commit/4615564b05d410575bb6ed3ed34ea136bf2e4312)
### Fixed
- Fix `Transport.perform_request`'s arguments `timeout` and `ignore` variable usage ([810](https://github.com/opensearch-project/opensearch-py/pull/810))
Expand Down
9 changes: 0 additions & 9 deletions opensearchpy/_async/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2507,9 +2507,7 @@ async def put_index_template(
)

@query_params(
"cause",
"cluster_manager_timeout",
"create",
"error_trace",
"filter_path",
"human",
Expand All @@ -2532,15 +2530,8 @@ async def simulate_index_template(
:arg name: Index or template name to simulate
:arg body: New index template definition, which will be included
in the simulation, as if it already exists in the system
:arg cause: User defined reason for dry-run creating the new
template for simulation purposes. Default is false.
:arg cluster_manager_timeout: Operation timeout for connection
to cluster-manager node.
:arg create: If `true`, the template passed in the body is only
used if no existing templates match the same index patterns. If `false`,
the simulation uses the template with the highest priority. Note that
the template is not permanently added or updated in either case; it is
only used for the simulation. Default is false.
:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
Expand Down
13 changes: 10 additions & 3 deletions opensearchpy/_async/plugins/asynchronous_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,24 @@ async def search(
with "-".
:arg human: Whether to return human readable values for
statistics. Default is True.
:arg index: The name of the index to be searched.
:arg index: The name of the index to be searched. Can be an
individual name, a comma-separated list of indexes, or a wildcard
expression of index names.
:arg keep_alive: The amount of time that the result is saved in
the cluster.
the cluster. For example, `2d` means that the results are stored in the
cluster for 48 hours. The saved search results are deleted after this
period or if the search is canceled. Note that this includes the query
execution time. If the query overruns this time, the process cancels
this query automatically.
:arg keep_on_completion: Whether you want to save the results in
the cluster after the search is complete.
:arg pretty: Whether to pretty format the returned JSON
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg wait_for_completion_timeout: The amount of time that you
plan to wait for the results.
plan to wait for the results. You can poll the remaining results based
on an ID. The maximum value is `300s`. Default is `1s`.
"""
return await self.transport.perform_request(
"POST",
Expand Down
9 changes: 0 additions & 9 deletions opensearchpy/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2507,9 +2507,7 @@ def put_index_template(
)

@query_params(
"cause",
"cluster_manager_timeout",
"create",
"error_trace",
"filter_path",
"human",
Expand All @@ -2532,15 +2530,8 @@ def simulate_index_template(
:arg name: Index or template name to simulate
:arg body: New index template definition, which will be included
in the simulation, as if it already exists in the system
:arg cause: User defined reason for dry-run creating the new
template for simulation purposes. Default is false.
:arg cluster_manager_timeout: Operation timeout for connection
to cluster-manager node.
:arg create: If `true`, the template passed in the body is only
used if no existing templates match the same index patterns. If `false`,
the simulation uses the template with the highest priority. Note that
the template is not permanently added or updated in either case; it is
only used for the simulation. Default is false.
:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
Expand Down
13 changes: 10 additions & 3 deletions opensearchpy/plugins/asynchronous_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,24 @@ def search(
with "-".
:arg human: Whether to return human readable values for
statistics. Default is True.
:arg index: The name of the index to be searched.
:arg index: The name of the index to be searched. Can be an
individual name, a comma-separated list of indexes, or a wildcard
expression of index names.
:arg keep_alive: The amount of time that the result is saved in
the cluster.
the cluster. For example, `2d` means that the results are stored in the
cluster for 48 hours. The saved search results are deleted after this
period or if the search is canceled. Note that this includes the query
execution time. If the query overruns this time, the process cancels
this query automatically.
:arg keep_on_completion: Whether you want to save the results in
the cluster after the search is complete.
:arg pretty: Whether to pretty format the returned JSON
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg wait_for_completion_timeout: The amount of time that you
plan to wait for the results.
plan to wait for the results. You can poll the remaining results based
on an ID. The maximum value is `300s`. Default is `1s`.
"""
return self.transport.perform_request(
"POST",
Expand Down

0 comments on commit 0c2c315

Please sign in to comment.