diff --git a/CHANGELOG.md b/CHANGELOG.md index 2691b252..0ef51c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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@4f27c67](https://github.com/opensearch-project/opensearch-api-specification/commit/4f27c67d3f249ef9fd16ff027d7b028736f3c117) - 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)) diff --git a/opensearchpy/_async/client/indices.py b/opensearchpy/_async/client/indices.py index 1e8125c6..99603830 100644 --- a/opensearchpy/_async/client/indices.py +++ b/opensearchpy/_async/client/indices.py @@ -2507,9 +2507,7 @@ async def put_index_template( ) @query_params( - "cause", "cluster_manager_timeout", - "create", "error_trace", "filter_path", "human", @@ -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 diff --git a/opensearchpy/_async/plugins/asynchronous_search.py b/opensearchpy/_async/plugins/asynchronous_search.py index ca4bb1fb..33e218de 100644 --- a/opensearchpy/_async/plugins/asynchronous_search.py +++ b/opensearchpy/_async/plugins/asynchronous_search.py @@ -119,9 +119,15 @@ 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 @@ -129,7 +135,8 @@ async def search( :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", diff --git a/opensearchpy/client/indices.py b/opensearchpy/client/indices.py index 61a5b972..c4b2405c 100644 --- a/opensearchpy/client/indices.py +++ b/opensearchpy/client/indices.py @@ -2507,9 +2507,7 @@ def put_index_template( ) @query_params( - "cause", "cluster_manager_timeout", - "create", "error_trace", "filter_path", "human", @@ -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 diff --git a/opensearchpy/plugins/asynchronous_search.py b/opensearchpy/plugins/asynchronous_search.py index f155d902..f208b8ad 100644 --- a/opensearchpy/plugins/asynchronous_search.py +++ b/opensearchpy/plugins/asynchronous_search.py @@ -119,9 +119,15 @@ 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 @@ -129,7 +135,8 @@ def search( :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",