From d3aa14948c647ad747f5666f5935d564ac4dd72d Mon Sep 17 00:00:00 2001 From: saimedhi Date: Sat, 20 Apr 2024 03:34:04 +0000 Subject: [PATCH] Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-20) Signed-off-by: GitHub --- CHANGELOG.md | 1 + opensearchpy/_async/client/__init__.py | 122 ++++++++++++++----------- opensearchpy/_async/client/cat.py | 16 ++-- opensearchpy/_async/client/cluster.py | 27 +++--- opensearchpy/_async/client/indices.py | 80 +++++++++------- opensearchpy/_async/client/ingest.py | 2 +- opensearchpy/_async/client/nodes.py | 3 +- opensearchpy/_async/client/snapshot.py | 10 +- opensearchpy/_async/client/tasks.py | 8 +- opensearchpy/client/__init__.py | 122 ++++++++++++++----------- opensearchpy/client/cat.py | 16 ++-- opensearchpy/client/cluster.py | 27 +++--- opensearchpy/client/indices.py | 80 +++++++++------- opensearchpy/client/ingest.py | 2 +- opensearchpy/client/nodes.py | 3 +- opensearchpy/client/snapshot.py | 10 +- opensearchpy/client/tasks.py | 8 +- 17 files changed, 297 insertions(+), 240 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfde0e7b..a469517a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,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@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) ### Security diff --git a/opensearchpy/_async/client/__init__.py b/opensearchpy/_async/client/__init__.py index 71a4b8c1..9792ef81 100644 --- a/opensearchpy/_async/client/__init__.py +++ b/opensearchpy/_async/client/__init__.py @@ -451,7 +451,7 @@ async def index( for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg require_alias: If `true`, the destination must be an index - alias. + alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -537,7 +537,7 @@ async def bulk( for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg require_alias: If `true`, the request’s actions must target - an index alias. + an index alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -643,7 +643,7 @@ async def count( targets other open indices. :arg analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.This parameter can only be used when the `q` query string - parameter is specified. + parameter is specified. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the `q` query string parameter is specified. @@ -673,7 +673,7 @@ async def count( :arg min_score: Sets the minimum `_score` value that documents must have to be included in the result. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -829,7 +829,7 @@ async def delete_by_query( returns an error if an index starts with `foo` but no index starts with `bar`. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string. :arg conflicts: What to do if delete by query hits version conflicts: `abort` or `proceed`. Valid choices are abort, proceed. @@ -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) + :arg from_: Starting offset (default: 0) Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -856,7 +856,7 @@ async def delete_by_query( :arg max_docs: Maximum number of documents to process.Defaults to all documents. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -865,12 +865,12 @@ async def delete_by_query( :arg request_cache: If `true`, the request cache is used for this request.Defaults to the index-level setting. :arg requests_per_second: The throttle for this request in sub- - requests per second. + requests per second. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. :arg scroll_size: Size of the scroll request that powers the - operation. + operation. Default is 100. :arg search_timeout: Explicit timeout for each search request.Defaults to no timeout. :arg search_type: The type of the search operation.Available @@ -900,7 +900,7 @@ async def delete_by_query( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ # from is a reserved word so it cannot be used, use from_ instead if "from_" in params: @@ -1048,7 +1048,7 @@ async def exists( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1120,7 +1120,7 @@ async def exists_source( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to @@ -1189,14 +1189,14 @@ async def explain( :arg _source_includes: A comma-separated list of source fields to include in the response. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string.This 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. :arg df: Field to use as default where no field prefix is given - in the query string. + in the query string. Default is _all. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1206,7 +1206,7 @@ async def explain( :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -1277,7 +1277,7 @@ async def field_caps( :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. :arg include_unmapped: If true, unmapped fields are included in - the response. + the response. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1334,7 +1334,7 @@ async def get( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1448,7 +1448,7 @@ async def get_source( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: Boolean) If true, the request is real-time as @@ -1524,7 +1524,7 @@ async def mget( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1580,7 +1580,7 @@ async def msearch( index aliases to search. :arg ccs_minimize_roundtrips: If true, network roundtrips between the coordinating node and remote clusters are minimized for - cross-cluster search requests. + cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1590,7 +1590,8 @@ async def msearch( :arg max_concurrent_searches: Maximum number of concurrent searches the multi search API can execute. :arg max_concurrent_shard_requests: Maximum number of concurrent - shard requests that each sub-search request executes per node. + shard requests that each sub-search request executes per node. Default + is 5. :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 @@ -1602,6 +1603,7 @@ async def msearch( response. :arg rest_total_hits_as_int: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. + Default is false. :arg search_type: Indicates whether global term and document frequencies should be used when scoring returned documents. Valid choices are query_then_fetch, dfs_query_then_fetch. @@ -1651,7 +1653,7 @@ async def msearch_template( aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are - minimized for cross-cluster search requests. + minimized for cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1664,7 +1666,7 @@ async def msearch_template( response. :arg rest_total_hits_as_int: If `true`, the response returns `hits.total` as an integer.If `false`, it returns `hits.total` as an - object. + object. Default is false. :arg search_type: The type of the search operation.Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are query_then_fetch, dfs_query_then_fetch. @@ -1723,7 +1725,7 @@ async def mtermvectors( errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term - frequencies. + frequencies. Default is True. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or @@ -1735,20 +1737,23 @@ async def mtermvectors( :arg ids: A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body :arg offsets: If `true`, the response includes term offsets. + Default is True. :arg payloads: If `true`, the response includes term payloads. + Default is True. :arg positions: If `true`, the response includes term positions. + Default is True. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to - near-real-time. + near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg term_statistics: If true, the response includes term - frequency and document frequency. + frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of a hit. :arg version_type: Specific version type. Valid choices are @@ -1925,7 +1930,7 @@ async def reindex( :arg refresh: If `true`, the request refreshes affected shards to make this operation visible to search. :arg requests_per_second: The throttle for this request in sub- - requests per second.Defaults to no throttle. + requests per second.Defaults to no throttle. Default is 0. :arg scroll: Specifies how long a consistent view of the index should be maintained for scrolled search. :arg slices: The number of slices this task should be divided @@ -1940,7 +1945,7 @@ async def reindex( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -2084,7 +2089,8 @@ async def scroll( response. :arg rest_total_hits_as_int: If true, the API response’s hit.total property is returned as an integer. If false, the API - response’s hit.total property is returned as an object. + response’s hit.total property is returned as an object. Default is + false. :arg scroll: Period to retain the search context for scrolling. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. @@ -2190,10 +2196,10 @@ async def search( `bar`. :arg allow_partial_search_results: If true, returns partial results if there are shard request timeouts or shard failures. If false, - returns an error with no partial results. + returns an error with no partial results. Default is True. :arg analyze_wildcard: If true, wildcard and prefix queries are analyzed.This parameter can only be used when the q query string - parameter is specified. + parameter is specified. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the q query string parameter is specified. @@ -2201,9 +2207,10 @@ async def search( should be reduced at once on the coordinating node.This value should be 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 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. + 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. @@ -2226,7 +2233,7 @@ async def search( :arg from_: Starting document offset.Needs to be non-negative.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` - parameter. + parameter. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased @@ -2245,7 +2252,7 @@ async def search( concurrent shard requests per node this search executes 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. + requests. Default is 5. :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 @@ -2271,7 +2278,8 @@ async def search( not, select shards using the default method;`_shards:,` to run the search only on the specified shards;`` (any string that does not start with `_`) to route searches with the same - `` to the same shards in the same order. + `` to the same shards in the same order. Default is + random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax using query @@ -2282,7 +2290,7 @@ async def search( settings. :arg rest_total_hits_as_int: Indicates whether `hits.total` should be rendered as an integer or an object in the rest search - response. + response. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. @@ -2299,6 +2307,7 @@ async def search( :arg size: Defines the number of hits to return.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` parameter. + Default is 10. :arg sort: A comma-separated list of : pairs. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. @@ -2401,9 +2410,9 @@ async def search_shards( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg routing: Custom value used to route operations to a @@ -2456,7 +2465,7 @@ async def search_template( returns an error if an index starts with `foo` but no index starts with `bar`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are - minimized for cross-cluster search requests. + minimized for cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg expand_wildcards: Type of index that wildcard patterns can @@ -2475,12 +2484,12 @@ async def search_template( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg profile: If `true`, the query execution is profiled. :arg rest_total_hits_as_int: If true, hits.total are rendered as - an integer in the response. + an integer in the response. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Specifies how long a consistent view of the @@ -2542,7 +2551,7 @@ async def termvectors( errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term - frequencies. + frequencies. Default is True. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or @@ -2552,20 +2561,23 @@ async def termvectors( :arg human: Whether to return human readable values for statistics. :arg offsets: If `true`, the response includes term offsets. + Default is True. :arg payloads: If `true`, the response includes term payloads. + Default is True. :arg positions: If `true`, the response includes term positions. + Default is True. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to - near-real-time. + near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg term_statistics: If `true`, the response includes term - frequency and document frequency. + frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of a hit. :arg version_type: Specific version type. Valid choices are @@ -2631,7 +2643,7 @@ async def update( has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. - :arg lang: The script language. + :arg lang: The script language. Default is painless. :arg pretty: Whether to pretty format the returned JSON response. :arg refresh: If 'true', Opensearch refreshes the affected @@ -2639,9 +2651,9 @@ async def update( for a refresh to make this operationvisible to search, if 'false' do nothing with refreshes. Valid choices are true, false, wait_for. :arg require_alias: If true, the destination must be an index - alias. + alias. Default is false. :arg retry_on_conflict: Specify how many times should the - operation be retried when a conflict occurs. + operation be retried when a conflict occurs. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -2736,7 +2748,7 @@ async def update_by_query( returns an error if an index starts with `foo` but no index starts with `bar`. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string. :arg conflicts: What to do if update by query hits version conflicts: `abort` or `proceed`. Valid choices are abort, proceed. @@ -2753,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) + :arg from_: Starting offset (default: 0) Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -2768,7 +2780,7 @@ async def update_by_query( this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -2777,12 +2789,12 @@ async def update_by_query( :arg request_cache: If `true`, the request cache is used for this request. :arg requests_per_second: The throttle for this request in sub- - requests per second. + requests per second. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. :arg scroll_size: Size of the scroll request that powers the - operation. + operation. Default is 100. :arg search_timeout: Explicit timeout for each search request. :arg search_type: The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are @@ -2811,7 +2823,7 @@ async def update_by_query( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ # from is a reserved word so it cannot be used, use from_ instead if "from_" in params: diff --git a/opensearchpy/_async/client/cat.py b/opensearchpy/_async/client/cat.py index a11c237a..70779bce 100644 --- a/opensearchpy/_async/client/cat.py +++ b/opensearchpy/_async/client/cat.py @@ -400,6 +400,7 @@ async def health( :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. + Default is True. :arg v: Verbose mode. Display column headers. Default is false. """ return await self.transport.perform_request( @@ -491,7 +492,8 @@ async def indices( :arg human: Whether to return human readable values for statistics. :arg include_unloaded_segments: If true, the response includes - information from segments that are not loaded into memory. + information from segments that are not loaded into memory. Default is + false. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, @@ -500,7 +502,7 @@ async def indices( :arg pretty: Whether to pretty format the returned JSON response. :arg pri: If true, the response only includes information from - primary shards. + primary shards. Default is false. :arg s: Comma-separated list of column names or column aliases to sort by. :arg source: The URL-encoded request definition. Useful for @@ -662,7 +664,7 @@ async def nodes( :arg format: A short version of the Accept header, e.g. json, yaml. :arg full_id: If `true`, return the full node ID. If `false`, - return the shortened node ID. + return the shortened node ID. Default is false. :arg h: Comma-separated list of column names to display. :arg help: Return help information. Default is false. :arg human: Whether to return human readable values for @@ -871,11 +873,11 @@ async def recovery( :arg index: Comma-separated list or wildcard expression of index names to limit the returned information. :arg active_only: If `true`, the response only includes ongoing - shard recoveries. + shard recoveries. Default is false. :arg bytes: The unit used to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1261,7 +1263,7 @@ async def snapshots( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `true`, the response does not - include information from unavailable snapshots. + include information from unavailable snapshots. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. @@ -1312,7 +1314,7 @@ async def tasks( :arg actions: The task action names, which are used to limit the response. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce diff --git a/opensearchpy/_async/client/cluster.py b/opensearchpy/_async/client/cluster.py index 71c6ee28..4c4cc78a 100644 --- a/opensearchpy/_async/client/cluster.py +++ b/opensearchpy/_async/client/cluster.py @@ -92,7 +92,7 @@ async def health( cluster, indices, shards, awareness_attributes. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -165,7 +165,7 @@ async def pending_tasks( statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -223,13 +223,13 @@ async def state( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) 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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master @@ -278,6 +278,7 @@ async def stats( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg pretty: Whether to pretty format the returned JSON @@ -386,10 +387,11 @@ async def get_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg include_defaults: If `true`, returns default cluster - settings from the local node. + settings from the local node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -436,7 +438,7 @@ async def put_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) Default is false. :arg human: Whether to return human readable values for statistics. :arg master_timeout (Deprecated: To promote inclusive language, @@ -508,9 +510,9 @@ async def allocation_explain( :arg human: Whether to return human readable values for statistics. :arg include_disk_info: If true, returns information about disk - usage and shard sizes. + usage and shard sizes. Default is false. :arg include_yes_decisions: If true, returns YES decisions in - explanation. + explanation. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -608,7 +610,7 @@ async def get_component_template( statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -661,7 +663,7 @@ async def put_component_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If `true`, this request cannot replace or update - existing component templates. + existing component templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -722,7 +724,7 @@ async def exists_component_template( statistics. :arg local: If true, the request retrieves information from the local node only.Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -769,7 +771,8 @@ async def delete_voting_config_exclusions( configuration exclusions list.Defaults to true, meaning that all excluded nodes must be removed fromthe cluster before this API takes any action. If set to false then thevoting configuration exclusions list is - cleared even if some excludednodes are still in the cluster. + cleared even if some excludednodes are still in the cluster. Default is + True. """ return await self.transport.perform_request( "DELETE", diff --git a/opensearchpy/_async/client/indices.py b/opensearchpy/_async/client/indices.py index 6ee29c1d..139e9df5 100644 --- a/opensearchpy/_async/client/indices.py +++ b/opensearchpy/_async/client/indices.py @@ -175,7 +175,7 @@ async def flush( :arg wait_if_ongoing: If `true`, the flush operation blocks until execution when another flush operation is running.If `false`, Opensearch returns an error if you request a flush when another flush - operation is running. + operation is running. Default is True. """ return await self.transport.perform_request( "POST", _make_path(index, "_flush"), params=params, headers=headers @@ -338,7 +338,8 @@ async def get( any wildcard expression, index alias, or _all value targets onlymissing or closed indices. This behavior applies even if the request targets other open indices. For example,a request targeting foo*,bar* returns an - error if an index starts with foo but no index starts with bar. + error if an index starts with foo but no index starts with bar. Default + is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg error_trace: Whether to include the stack trace of returned @@ -351,15 +352,16 @@ async def get( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If false, requests that target a - missing index return an error. + missing index return an error. Default is false. :arg include_defaults: If true, return all default settings in - the response. + the response. Default is false. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -553,7 +555,7 @@ async def delete( :arg allow_no_indices: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request - targets other open indices. + targets other open indices. Default is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg error_trace: Whether to include the stack trace of returned @@ -568,7 +570,7 @@ async def delete( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an - error if it targets a missing or closed index. + error if it targets a missing or closed index. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -616,7 +618,7 @@ async def exists( :arg allow_no_indices: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request - targets other open indices. + targets other open indices. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg expand_wildcards: Type of index that wildcard patterns can @@ -627,14 +629,15 @@ async def exists( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an - error if it targets a missing or closed index. + error if it targets a missing or closed index. Default is false. :arg include_defaults: If `true`, return all default settings in - the response. + the response. Default is false. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -706,7 +709,7 @@ async def put_mapping( received before the timeout expires, the request fails and returns an error. :arg write_index_only: If `true`, the mappings are applied only - to the current write index for the target. + to the current write index for the target. Default is false. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -768,7 +771,7 @@ async def get_mapping( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -830,7 +833,7 @@ async def get_field_mapping( :arg include_defaults: If `true`, return all default settings in the response. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -953,7 +956,7 @@ async def exists_alias( missing data stream or index in the target indices or data streams return an error. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1012,7 +1015,7 @@ async def get_alias( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1150,7 +1153,7 @@ async def put_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If true, this request cannot replace or update - existing index templates. + existing index templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1211,11 +1214,11 @@ async def exists_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) 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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -1263,10 +1266,11 @@ async def get_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -1378,15 +1382,16 @@ async def get_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in - the response. + the response. Default is false. :arg local: If `true`, the request retrieves information from the local node only. If`false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -1447,6 +1452,7 @@ async def put_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices @@ -1456,7 +1462,7 @@ async def put_settings( to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. :arg preserve_existing: If `true`, existing index settings - remain unchanged. + remain unchanged. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1523,16 +1529,17 @@ async def stats( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg forbid_closed_indices: If true, statistics are not - collected from closed indices. + collected from closed indices. Default is True. :arg groups: Comma-separated list of search groups to include in the search statistics. :arg human: Whether to return human readable values for statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only - applies if segment stats are requested). + applies if segment stats are requested). Default is false. :arg include_unloaded_segments: If true, the response includes - information from segments that are not loaded into memory. + information from segments that are not loaded into memory. Default is + false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. @@ -1591,6 +1598,7 @@ async def segments( :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the request returns a verbose response. + Default is false. """ return await self.transport.perform_request( "GET", _make_path(index, "_segments"), params=params, headers=headers @@ -1637,7 +1645,7 @@ async def validate_query( missing or closed indices.This behavior applies even if the request targets other open indices. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the `q` query string parameter is specified. @@ -1760,9 +1768,9 @@ async def recovery( aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. :arg active_only: If `true`, the response only includes ongoing - shard recoveries. + shard recoveries. Default is false. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1962,7 +1970,7 @@ 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) + performing the operation (default: true) Default is True. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices @@ -1978,7 +1986,7 @@ async def forcemerge( :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: Should the request wait until the - force merge is completed. + force merge is completed. Default is True. """ return await self.transport.perform_request( "POST", _make_path(index, "_forcemerge"), params=params, headers=headers @@ -2163,6 +2171,7 @@ async def rollover( to cluster-manager node. :arg dry_run: If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. + Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2401,11 +2410,12 @@ async def get_index_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -2448,7 +2458,7 @@ async def put_index_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If `true`, this request cannot replace or update - existing index templates. + existing index templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2509,7 +2519,7 @@ async def simulate_index_template( used if no existingtemplates match the same index patterns. If `false`, the simulation usesthe template with the highest priority. Note that the template is notpermanently added or updated in either case; it is only - used for thesimulation. + used for thesimulation. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2598,7 +2608,7 @@ async def simulate_template( 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. + only used for the simulation. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce diff --git a/opensearchpy/_async/client/ingest.py b/opensearchpy/_async/client/ingest.py index 45f92604..84846638 100644 --- a/opensearchpy/_async/client/ingest.py +++ b/opensearchpy/_async/client/ingest.py @@ -217,7 +217,7 @@ async def simulate( :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the response includes output data for - each processor in the executed pipeline. + each processor in the executed pipeline. Default is false. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") diff --git a/opensearchpy/_async/client/nodes.py b/opensearchpy/_async/client/nodes.py index 3cb5b634..eba76488 100644 --- a/opensearchpy/_async/client/nodes.py +++ b/opensearchpy/_async/client/nodes.py @@ -107,6 +107,7 @@ async def info( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg pretty: Whether to pretty format the returned JSON @@ -171,7 +172,7 @@ async def stats( statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only - applies if segment stats are requested). + applies if segment stats are requested). Default is false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. diff --git a/opensearchpy/_async/client/snapshot.py b/opensearchpy/_async/client/snapshot.py index 4f7d7bad..79d8de65 100644 --- a/opensearchpy/_async/client/snapshot.py +++ b/opensearchpy/_async/client/snapshot.py @@ -84,7 +84,7 @@ async def create( libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns - a response when the snapshot initializes. + a response when the snapshot initializes. Default is false. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -185,7 +185,7 @@ async def get( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If false, the request returns an error - for any snapshots that are unavailable. + for any snapshots that are unavailable. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -397,7 +397,7 @@ async def restore( :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: Should this request wait until the - operation has completed before returning + operation has completed before returning Default is false. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -444,7 +444,7 @@ async def status( statistics. :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is - thrown + thrown 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/_async/client/tasks.py b/opensearchpy/_async/client/tasks.py index 3cbfdfec..7302cbac 100644 --- a/opensearchpy/_async/client/tasks.py +++ b/opensearchpy/_async/client/tasks.py @@ -67,7 +67,7 @@ async def list( :arg actions: Comma-separated list or wildcard expression of actions used to limit the request. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -91,7 +91,7 @@ async def list( received before the timeout expires, the request fails and returns an error. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is false. """ return await self.transport.perform_request( "GET", "/_tasks", params=params, headers=headers @@ -136,7 +136,7 @@ async def cancel( libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults - to false + to false Default is false. """ return await self.transport.perform_request( "POST", @@ -179,7 +179,7 @@ async def get( received before the timeout expires, the request fails and returns an error. :arg wait_for_completion: If `true`, the request blocks until - the task has completed. + the task has completed. Default is false. """ if task_id in SKIP_IN_PATH: warnings.warn( diff --git a/opensearchpy/client/__init__.py b/opensearchpy/client/__init__.py index f480daf5..0442bad1 100644 --- a/opensearchpy/client/__init__.py +++ b/opensearchpy/client/__init__.py @@ -451,7 +451,7 @@ def index( for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg require_alias: If `true`, the destination must be an index - alias. + alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -537,7 +537,7 @@ def bulk( for a refresh to make this operation visible to search, if `false` do nothing with refreshes.Valid values: `true`, `false`, `wait_for`. :arg require_alias: If `true`, the request’s actions must target - an index alias. + an index alias. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -643,7 +643,7 @@ def count( targets other open indices. :arg analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.This parameter can only be used when the `q` query string - parameter is specified. + parameter is specified. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the `q` query string parameter is specified. @@ -673,7 +673,7 @@ def count( :arg min_score: Sets the minimum `_score` value that documents must have to be included in the result. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -829,7 +829,7 @@ def delete_by_query( returns an error if an index starts with `foo` but no index starts with `bar`. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string. :arg conflicts: What to do if delete by query hits version conflicts: `abort` or `proceed`. Valid choices are abort, proceed. @@ -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) + :arg from_: Starting offset (default: 0) Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -856,7 +856,7 @@ def delete_by_query( :arg max_docs: Maximum number of documents to process.Defaults to all documents. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -865,12 +865,12 @@ def delete_by_query( :arg request_cache: If `true`, the request cache is used for this request.Defaults to the index-level setting. :arg requests_per_second: The throttle for this request in sub- - requests per second. + requests per second. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. :arg scroll_size: Size of the scroll request that powers the - operation. + operation. Default is 100. :arg search_timeout: Explicit timeout for each search request.Defaults to no timeout. :arg search_type: The type of the search operation.Available @@ -900,7 +900,7 @@ def delete_by_query( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ # from is a reserved word so it cannot be used, use from_ instead if "from_" in params: @@ -1048,7 +1048,7 @@ def exists( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1120,7 +1120,7 @@ def exists_source( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to @@ -1189,14 +1189,14 @@ def explain( :arg _source_includes: A comma-separated list of source fields to include in the response. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string.This 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. :arg df: Field to use as default where no field prefix is given - in the query string. + in the query string. Default is _all. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1206,7 +1206,7 @@ def explain( :arg lenient: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -1277,7 +1277,7 @@ def field_caps( :arg ignore_unavailable: If `true`, missing or closed indices are not included in the response. :arg include_unmapped: If true, unmapped fields are included in - the response. + the response. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1334,7 +1334,7 @@ def get( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1448,7 +1448,7 @@ def get_source( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: Boolean) If true, the request is real-time as @@ -1524,7 +1524,7 @@ def mget( :arg human: Whether to return human readable values for statistics. :arg preference: Specifies the node or shard the operation - should be performed on. Random by default. + should be performed on. Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If `true`, the request is real-time as opposed to @@ -1580,7 +1580,7 @@ def msearch( index aliases to search. :arg ccs_minimize_roundtrips: If true, network roundtrips between the coordinating node and remote clusters are minimized for - cross-cluster search requests. + cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1590,7 +1590,8 @@ def msearch( :arg max_concurrent_searches: Maximum number of concurrent searches the multi search API can execute. :arg max_concurrent_shard_requests: Maximum number of concurrent - shard requests that each sub-search request executes per node. + shard requests that each sub-search request executes per node. Default + is 5. :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 @@ -1602,6 +1603,7 @@ def msearch( response. :arg rest_total_hits_as_int: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. + Default is false. :arg search_type: Indicates whether global term and document frequencies should be used when scoring returned documents. Valid choices are query_then_fetch, dfs_query_then_fetch. @@ -1651,7 +1653,7 @@ def msearch_template( aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are - minimized for cross-cluster search requests. + minimized for cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1664,7 +1666,7 @@ def msearch_template( response. :arg rest_total_hits_as_int: If `true`, the response returns `hits.total` as an integer.If `false`, it returns `hits.total` as an - object. + object. Default is false. :arg search_type: The type of the search operation.Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are query_then_fetch, dfs_query_then_fetch. @@ -1723,7 +1725,7 @@ def mtermvectors( errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term - frequencies. + frequencies. Default is True. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or @@ -1735,20 +1737,23 @@ def mtermvectors( :arg ids: A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body :arg offsets: If `true`, the response includes term offsets. + Default is True. :arg payloads: If `true`, the response includes term payloads. + Default is True. :arg positions: If `true`, the response includes term positions. + Default is True. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to - near-real-time. + near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg term_statistics: If true, the response includes term - frequency and document frequency. + frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of a hit. :arg version_type: Specific version type. Valid choices are @@ -1925,7 +1930,7 @@ def reindex( :arg refresh: If `true`, the request refreshes affected shards to make this operation visible to search. :arg requests_per_second: The throttle for this request in sub- - requests per second.Defaults to no throttle. + requests per second.Defaults to no throttle. Default is 0. :arg scroll: Specifies how long a consistent view of the index should be maintained for scrolled search. :arg slices: The number of slices this task should be divided @@ -1940,7 +1945,7 @@ def reindex( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -2084,7 +2089,8 @@ def scroll( response. :arg rest_total_hits_as_int: If true, the API response’s hit.total property is returned as an integer. If false, the API - response’s hit.total property is returned as an object. + response’s hit.total property is returned as an object. Default is + false. :arg scroll: Period to retain the search context for scrolling. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. @@ -2190,10 +2196,10 @@ def search( `bar`. :arg allow_partial_search_results: If true, returns partial results if there are shard request timeouts or shard failures. If false, - returns an error with no partial results. + returns an error with no partial results. Default is True. :arg analyze_wildcard: If true, wildcard and prefix queries are analyzed.This parameter can only be used when the q query string - parameter is specified. + parameter is specified. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the q query string parameter is specified. @@ -2201,9 +2207,10 @@ def search( should be reduced at once on the coordinating node.This value should be 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 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. + 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. @@ -2226,7 +2233,7 @@ def search( :arg from_: Starting document offset.Needs to be non-negative.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` - parameter. + parameter. Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_throttled: If `true`, concrete, expanded or aliased @@ -2245,7 +2252,7 @@ def search( concurrent shard requests per node this search executes 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. + requests. Default is 5. :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 @@ -2271,7 +2278,8 @@ def search( not, select shards using the default method;`_shards:,` to run the search only on the specified shards;`` (any string that does not start with `_`) to route searches with the same - `` to the same shards in the same order. + `` to the same shards in the same order. Default is + random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax using query @@ -2282,7 +2290,7 @@ def search( settings. :arg rest_total_hits_as_int: Indicates whether `hits.total` should be rendered as an integer or an object in the rest search - response. + response. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. @@ -2299,6 +2307,7 @@ def search( :arg size: Defines the number of hits to return.By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.To page through more hits, use the `search_after` parameter. + Default is 10. :arg sort: A comma-separated list of : pairs. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. @@ -2401,9 +2410,9 @@ def search_shards( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg routing: Custom value used to route operations to a @@ -2456,7 +2465,7 @@ def search_template( returns an error if an index starts with `foo` but no index starts with `bar`. :arg ccs_minimize_roundtrips: If `true`, network round-trips are - minimized for cross-cluster search requests. + minimized for cross-cluster search requests. Default is True. :arg error_trace: Whether to include the stack trace of returned errors. :arg expand_wildcards: Type of index that wildcard patterns can @@ -2475,12 +2484,12 @@ def search_template( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg profile: If `true`, the query execution is profiled. :arg rest_total_hits_as_int: If true, hits.total are rendered as - an integer in the response. + an integer in the response. Default is false. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Specifies how long a consistent view of the @@ -2542,7 +2551,7 @@ def termvectors( errors. :arg field_statistics: If `true`, the response includes the document count, sum of document frequencies, and sum of total term - frequencies. + frequencies. Default is True. :arg fields: Comma-separated list or wildcard expressions of fields to include in the statistics.Used as the default list unless a specific field list is provided in the `completion_fields` or @@ -2552,20 +2561,23 @@ def termvectors( :arg human: Whether to return human readable values for statistics. :arg offsets: If `true`, the response includes term offsets. + Default is True. :arg payloads: If `true`, the response includes term payloads. + Default is True. :arg positions: If `true`, the response includes term positions. + Default is True. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg realtime: If true, the request is real-time as opposed to - near-real-time. + near-real-time. Default is True. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg term_statistics: If `true`, the response includes term - frequency and document frequency. + frequency and document frequency. Default is false. :arg version: If `true`, returns the document version as part of a hit. :arg version_type: Specific version type. Valid choices are @@ -2631,7 +2643,7 @@ def update( has this primary term. :arg if_seq_no: Only perform the operation if the document has this sequence number. - :arg lang: The script language. + :arg lang: The script language. Default is painless. :arg pretty: Whether to pretty format the returned JSON response. :arg refresh: If 'true', Opensearch refreshes the affected @@ -2639,9 +2651,9 @@ def update( for a refresh to make this operationvisible to search, if 'false' do nothing with refreshes. Valid choices are true, false, wait_for. :arg require_alias: If true, the destination must be an index - alias. + alias. Default is false. :arg retry_on_conflict: Specify how many times should the - operation be retried when a conflict occurs. + operation be retried when a conflict occurs. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg source: The URL-encoded request definition. Useful for @@ -2736,7 +2748,7 @@ def update_by_query( returns an error if an index starts with `foo` but no index starts with `bar`. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string. :arg conflicts: What to do if update by query hits version conflicts: `abort` or `proceed`. Valid choices are abort, proceed. @@ -2753,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) + :arg from_: Starting offset (default: 0) Default is 0. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an @@ -2768,7 +2780,7 @@ def update_by_query( this request.If a final pipeline is configured it will always run, regardless of the value of this parameter. :arg preference: Specifies the node or shard the operation - should be performed on.Random by default. + should be performed on.Random by default. Default is random. :arg pretty: Whether to pretty format the returned JSON response. :arg q: Query in the Lucene query string syntax. @@ -2777,12 +2789,12 @@ def update_by_query( :arg request_cache: If `true`, the request cache is used for this request. :arg requests_per_second: The throttle for this request in sub- - requests per second. + requests per second. Default is 0. :arg routing: Custom value used to route operations to a specific shard. :arg scroll: Period to retain the search context for scrolling. :arg scroll_size: Size of the scroll request that powers the - operation. + operation. Default is 100. :arg search_timeout: Explicit timeout for each search request. :arg search_type: The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are @@ -2811,7 +2823,7 @@ def update_by_query( positive integer up to the total number of shards in the index (`number_of_replicas+1`). Valid choices are all, index-setting. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is True. """ # from is a reserved word so it cannot be used, use from_ instead if "from_" in params: diff --git a/opensearchpy/client/cat.py b/opensearchpy/client/cat.py index e92741e6..c8f51177 100644 --- a/opensearchpy/client/cat.py +++ b/opensearchpy/client/cat.py @@ -400,6 +400,7 @@ def health( :arg time: The unit used to display time values. Valid choices are nanos, micros, ms, s, m, h, d. :arg ts: If true, returns `HH:MM:SS` and Unix epoch timestamps. + Default is True. :arg v: Verbose mode. Display column headers. Default is false. """ return self.transport.perform_request( @@ -491,7 +492,8 @@ def indices( :arg human: Whether to return human readable values for statistics. :arg include_unloaded_segments: If true, the response includes - information from segments that are not loaded into memory. + information from segments that are not loaded into memory. Default is + false. :arg local: Return local information, do not retrieve the state from cluster-manager node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, @@ -500,7 +502,7 @@ def indices( :arg pretty: Whether to pretty format the returned JSON response. :arg pri: If true, the response only includes information from - primary shards. + primary shards. Default is false. :arg s: Comma-separated list of column names or column aliases to sort by. :arg source: The URL-encoded request definition. Useful for @@ -662,7 +664,7 @@ def nodes( :arg format: A short version of the Accept header, e.g. json, yaml. :arg full_id: If `true`, return the full node ID. If `false`, - return the shortened node ID. + return the shortened node ID. Default is false. :arg h: Comma-separated list of column names to display. :arg help: Return help information. Default is false. :arg human: Whether to return human readable values for @@ -871,11 +873,11 @@ def recovery( :arg index: Comma-separated list or wildcard expression of index names to limit the returned information. :arg active_only: If `true`, the response only includes ongoing - shard recoveries. + shard recoveries. Default is false. :arg bytes: The unit used to display byte values. Valid choices are b, k, kb, m, mb, g, gb, t, tb, p, pb. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1261,7 +1263,7 @@ def snapshots( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `true`, the response does not - include information from unavailable snapshots. + include information from unavailable snapshots. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Operation timeout for connection to master node. @@ -1312,7 +1314,7 @@ def tasks( :arg actions: The task action names, which are used to limit the response. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce diff --git a/opensearchpy/client/cluster.py b/opensearchpy/client/cluster.py index 4bca0529..2988c8ea 100644 --- a/opensearchpy/client/cluster.py +++ b/opensearchpy/client/cluster.py @@ -92,7 +92,7 @@ def health( cluster, indices, shards, awareness_attributes. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -165,7 +165,7 @@ def pending_tasks( statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -223,13 +223,13 @@ def state( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) 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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Specify timeout for connection to master @@ -278,6 +278,7 @@ def stats( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg pretty: Whether to pretty format the returned JSON @@ -386,10 +387,11 @@ def get_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg include_defaults: If `true`, returns default cluster - settings from the local node. + settings from the local node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -436,7 +438,7 @@ def put_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) Default is false. :arg human: Whether to return human readable values for statistics. :arg master_timeout (Deprecated: To promote inclusive language, @@ -508,9 +510,9 @@ def allocation_explain( :arg human: Whether to return human readable values for statistics. :arg include_disk_info: If true, returns information about disk - usage and shard sizes. + usage and shard sizes. Default is false. :arg include_yes_decisions: If true, returns YES decisions in - explanation. + explanation. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -608,7 +610,7 @@ def get_component_template( statistics. :arg local: If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -661,7 +663,7 @@ def put_component_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If `true`, this request cannot replace or update - existing component templates. + existing component templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -722,7 +724,7 @@ def exists_component_template( statistics. :arg local: If true, the request retrieves information from the local node only.Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -769,7 +771,8 @@ def delete_voting_config_exclusions( configuration exclusions list.Defaults to true, meaning that all excluded nodes must be removed fromthe cluster before this API takes any action. If set to false then thevoting configuration exclusions list is - cleared even if some excludednodes are still in the cluster. + cleared even if some excludednodes are still in the cluster. Default is + True. """ return self.transport.perform_request( "DELETE", diff --git a/opensearchpy/client/indices.py b/opensearchpy/client/indices.py index 2dec6548..27894be0 100644 --- a/opensearchpy/client/indices.py +++ b/opensearchpy/client/indices.py @@ -175,7 +175,7 @@ def flush( :arg wait_if_ongoing: If `true`, the flush operation blocks until execution when another flush operation is running.If `false`, Opensearch returns an error if you request a flush when another flush - operation is running. + operation is running. Default is True. """ return self.transport.perform_request( "POST", _make_path(index, "_flush"), params=params, headers=headers @@ -338,7 +338,8 @@ def get( any wildcard expression, index alias, or _all value targets onlymissing or closed indices. This behavior applies even if the request targets other open indices. For example,a request targeting foo*,bar* returns an - error if an index starts with foo but no index starts with bar. + error if an index starts with foo but no index starts with bar. Default + is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg error_trace: Whether to include the stack trace of returned @@ -351,15 +352,16 @@ def get( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If false, requests that target a - missing index return an error. + missing index return an error. Default is false. :arg include_defaults: If true, return all default settings in - the response. + the response. Default is false. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -553,7 +555,7 @@ def delete( :arg allow_no_indices: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request - targets other open indices. + targets other open indices. Default is false. :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg error_trace: Whether to include the stack trace of returned @@ -568,7 +570,7 @@ def delete( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an - error if it targets a missing or closed index. + error if it targets a missing or closed index. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -616,7 +618,7 @@ def exists( :arg allow_no_indices: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.This behavior applies even if the request - targets other open indices. + targets other open indices. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg expand_wildcards: Type of index that wildcard patterns can @@ -627,14 +629,15 @@ def exists( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an - error if it targets a missing or closed index. + error if it targets a missing or closed index. Default is false. :arg include_defaults: If `true`, return all default settings in - the response. + the response. Default is false. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -706,7 +709,7 @@ def put_mapping( received before the timeout expires, the request fails and returns an error. :arg write_index_only: If `true`, the mappings are applied only - to the current write index for the target. + to the current write index for the target. Default is false. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") @@ -768,7 +771,7 @@ def get_mapping( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -830,7 +833,7 @@ def get_field_mapping( :arg include_defaults: If `true`, return all default settings in the response. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -953,7 +956,7 @@ def exists_alias( missing data stream or index in the target indices or data streams return an error. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1012,7 +1015,7 @@ def get_alias( :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1150,7 +1153,7 @@ def put_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If true, this request cannot replace or update - existing index templates. + existing index templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1211,11 +1214,11 @@ def exists_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: Return settings in flat format (default: - false) + false) 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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -1263,10 +1266,11 @@ def get_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg local: If `true`, the request retrieves information from - the local node only. + the local node only. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node.If no response is received before the timeout @@ -1378,15 +1382,16 @@ def get_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If `false`, the request returns an error if it targets a missing or closed index. :arg include_defaults: If `true`, return all default settings in - the response. + the response. Default is false. :arg local: If `true`, the request retrieves information from the local node only. If`false`, information is retrieved from the master - node. + node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response isreceived before the timeout @@ -1447,6 +1452,7 @@ def put_settings( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices @@ -1456,7 +1462,7 @@ def put_settings( to the master node. If no response isreceived before the timeout expires, the request fails and returns anerror. :arg preserve_existing: If `true`, existing index settings - remain unchanged. + remain unchanged. Default is false. :arg pretty: Whether to pretty format the returned JSON response. :arg source: The URL-encoded request definition. Useful for @@ -1523,16 +1529,17 @@ def stats( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg forbid_closed_indices: If true, statistics are not - collected from closed indices. + collected from closed indices. Default is True. :arg groups: Comma-separated list of search groups to include in the search statistics. :arg human: Whether to return human readable values for statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only - applies if segment stats are requested). + applies if segment stats are requested). Default is false. :arg include_unloaded_segments: If true, the response includes - information from segments that are not loaded into memory. + information from segments that are not loaded into memory. Default is + false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. @@ -1591,6 +1598,7 @@ def segments( :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the request returns a verbose response. + Default is false. """ return self.transport.perform_request( "GET", _make_path(index, "_segments"), params=params, headers=headers @@ -1637,7 +1645,7 @@ def validate_query( missing or closed indices.This behavior applies even if the request targets other open indices. :arg analyze_wildcard: If `true`, wildcard and prefix queries - are analyzed. + are analyzed. Default is false. :arg analyzer: Analyzer to use for the query string.This parameter can only be used when the `q` query string parameter is specified. @@ -1760,9 +1768,9 @@ def recovery( aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. :arg active_only: If `true`, the response only includes ongoing - shard recoveries. + shard recoveries. Default is false. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -1962,7 +1970,7 @@ 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) + performing the operation (default: true) Default is True. :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: Whether specified concrete indices @@ -1978,7 +1986,7 @@ def forcemerge( :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: Should the request wait until the - force merge is completed. + force merge is completed. Default is True. """ return self.transport.perform_request( "POST", _make_path(index, "_forcemerge"), params=params, headers=headers @@ -2163,6 +2171,7 @@ def rollover( to cluster-manager node. :arg dry_run: If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. + Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2401,11 +2410,12 @@ def get_index_template( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg local: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved - from the master node. + from the master node. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -2448,7 +2458,7 @@ def put_index_template( :arg cluster_manager_timeout: Operation timeout for connection to cluster-manager node. :arg create: If `true`, this request cannot replace or update - existing index templates. + existing index templates. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2509,7 +2519,7 @@ def simulate_index_template( used if no existingtemplates match the same index patterns. If `false`, the simulation usesthe template with the highest priority. Note that the template is notpermanently added or updated in either case; it is only - used for thesimulation. + used for thesimulation. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -2598,7 +2608,7 @@ def simulate_template( 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. + only used for the simulation. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce diff --git a/opensearchpy/client/ingest.py b/opensearchpy/client/ingest.py index 4b11d5c5..14495bff 100644 --- a/opensearchpy/client/ingest.py +++ b/opensearchpy/client/ingest.py @@ -217,7 +217,7 @@ def simulate( :arg source: The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. :arg verbose: If `true`, the response includes output data for - each processor in the executed pipeline. + each processor in the executed pipeline. Default is false. """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") diff --git a/opensearchpy/client/nodes.py b/opensearchpy/client/nodes.py index eb224d49..7eff84ac 100644 --- a/opensearchpy/client/nodes.py +++ b/opensearchpy/client/nodes.py @@ -107,6 +107,7 @@ def info( :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If true, returns settings in flat format. + Default is false. :arg human: Whether to return human readable values for statistics. :arg pretty: Whether to pretty format the returned JSON @@ -171,7 +172,7 @@ def stats( statistics. :arg include_segment_file_sizes: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only - applies if segment stats are requested). + applies if segment stats are requested). Default is false. :arg level: Indicates whether statistics are aggregated at the cluster, index, or shard level. Valid choices are cluster, indices, shards. diff --git a/opensearchpy/client/snapshot.py b/opensearchpy/client/snapshot.py index 7e57e474..294fd323 100644 --- a/opensearchpy/client/snapshot.py +++ b/opensearchpy/client/snapshot.py @@ -84,7 +84,7 @@ def create( libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns - a response when the snapshot initializes. + a response when the snapshot initializes. Default is false. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -185,7 +185,7 @@ def get( :arg human: Whether to return human readable values for statistics. :arg ignore_unavailable: If false, the request returns an error - for any snapshots that are unavailable. + for any snapshots that are unavailable. Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Period to wait for a connection to the master node. If no response is received before the timeout @@ -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) + from cluster-manager node (default: false) Default is false. :arg master_timeout (Deprecated: To promote inclusive language, use 'cluster_manager_timeout' instead.): Explicit operation timeout for connection to master node @@ -397,7 +397,7 @@ def restore( :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: Should this request wait until the - operation has completed before returning + operation has completed before returning Default is false. """ for param in (repository, snapshot): if param in SKIP_IN_PATH: @@ -444,7 +444,7 @@ def status( statistics. :arg ignore_unavailable: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is - thrown + thrown 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/tasks.py b/opensearchpy/client/tasks.py index 25eda7a1..03705432 100644 --- a/opensearchpy/client/tasks.py +++ b/opensearchpy/client/tasks.py @@ -67,7 +67,7 @@ def list( :arg actions: Comma-separated list or wildcard expression of actions used to limit the request. :arg detailed: If `true`, the response includes detailed - information about shard recoveries. + information about shard recoveries. Default is false. :arg error_trace: Whether to include the stack trace of returned errors. :arg filter_path: Comma-separated list of filters used to reduce @@ -91,7 +91,7 @@ def list( received before the timeout expires, the request fails and returns an error. :arg wait_for_completion: If `true`, the request blocks until - the operation is complete. + the operation is complete. Default is false. """ return self.transport.perform_request( "GET", "/_tasks", params=params, headers=headers @@ -136,7 +136,7 @@ def cancel( libraries that do not accept a request body for non-POST requests. :arg wait_for_completion: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults - to false + to false Default is false. """ return self.transport.perform_request( "POST", @@ -179,7 +179,7 @@ def get( received before the timeout expires, the request fails and returns an error. :arg wait_for_completion: If `true`, the request blocks until - the task has completed. + the task has completed. Default is false. """ if task_id in SKIP_IN_PATH: warnings.warn(