diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index a42043065..7a90eebb8 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -69,7 +69,7 @@ def flush(self, index=None, params=None): return self.transport.perform_request('POST', _make_path(index, '_flush'), params=params) - @query_params('master_timeout', 'timeout', 'wait_for_active_shards', 'include_type_name') + @query_params('master_timeout', 'request_timeout', 'wait_for_active_shards', 'include_type_name') def create(self, index, body=None, params=None): """ Create an index in Elasticsearch. @@ -78,7 +78,7 @@ def create(self, index, body=None, params=None): :arg index: The name of the index :arg body: The configuration for the index (`settings` and `mappings`) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout :arg wait_for_active_shards: Set the number of active shards to wait for before the operation returns. :arg include_type_name: Specify whether requests and responses should include a @@ -117,7 +117,7 @@ def get(self, index, feature=None, params=None): feature), params=params) @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', - 'master_timeout', 'timeout') + 'master_timeout', 'request_timeout') def open(self, index, params=None): """ Open a closed index to make it available for search. @@ -133,7 +133,7 @@ def open(self, index, params=None): :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -141,7 +141,7 @@ def open(self, index, params=None): '_open'), params=params) @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', - 'master_timeout', 'timeout') + 'master_timeout', 'request_timeout') def close(self, index, params=None): """ Close an index to remove it's overhead from the cluster. Closed index @@ -158,7 +158,7 @@ def close(self, index, params=None): :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -166,7 +166,7 @@ def close(self, index, params=None): '_close'), params=params) @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', - 'master_timeout', 'timeout') + 'master_timeout', 'request_timeout') def delete(self, index, params=None): """ Delete an index in Elasticsearch @@ -181,7 +181,7 @@ def delete(self, index, params=None): choices are: 'open', 'closed', 'none', 'all' :arg ignore_unavailable: Ignore unavailable indexes (default: false) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout """ if index in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'index'.") @@ -241,7 +241,7 @@ def exists_type(self, index, doc_type, params=None): '_mapping', doc_type), params=params) @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', - 'master_timeout', 'timeout','include_type_name') + 'master_timeout', 'request_timeout','include_type_name') def put_mapping(self, doc_type, body, index=None, params=None): """ Register specific mapping definition for a specific type. @@ -261,7 +261,7 @@ def put_mapping(self, doc_type, body, index=None, params=None): :arg ignore_unavailable: Whether specified concrete indices should be ignored when unavailable (missing or closed) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout :arg include_type_name: Specify whether requests and responses should include a type name (default: depends on Elasticsearch version). """ @@ -326,7 +326,7 @@ def get_field_mapping(self, fields, index=None, doc_type=None, params=None): return self.transport.perform_request('GET', _make_path(index, '_mapping', doc_type, 'field', fields), params=params) - @query_params('master_timeout', 'timeout') + @query_params('master_timeout', 'request_timeout') def put_alias(self, index, name, body=None, params=None): """ Create an alias for a specific index/indices. @@ -338,7 +338,7 @@ def put_alias(self, index, name, body=None, params=None): :arg name: The name of the alias to be created or updated :arg body: The settings for the alias, such as `routing` or `filter` :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit timeout for the operation + :arg request_timeout: Explicit timeout for the operation """ for param in (index, name): if param in SKIP_IN_PATH: @@ -392,7 +392,7 @@ def get_alias(self, index=None, name=None, params=None): return self.transport.perform_request('GET', _make_path(index, '_alias', name), params=params) - @query_params('master_timeout', 'timeout') + @query_params('master_timeout', 'request_timeout') def update_aliases(self, body, params=None): """ Update specified aliases. @@ -400,14 +400,14 @@ def update_aliases(self, body, params=None): :arg body: The definition of `actions` to perform :arg master_timeout: Specify timeout for connection to master - :arg timeout: Request timeout + :arg request_timeout: Request timeout """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") return self.transport.perform_request('POST', '/_aliases', params=params, body=body) - @query_params('master_timeout', 'timeout') + @query_params('master_timeout', 'request_timeout') def delete_alias(self, index, name, params=None): """ Delete specific alias. @@ -419,7 +419,7 @@ def delete_alias(self, index, name, params=None): wildcards); use `_all` to delete all aliases for the specified indices. :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit timeout for the operation + :arg request_timeout: Explicit timeout for the operation """ for param in (index, name): if param in SKIP_IN_PATH: @@ -428,7 +428,7 @@ def delete_alias(self, index, name, params=None): '_alias', name), params=params) @query_params('create', 'flat_settings', 'master_timeout', 'order', - 'timeout', 'include_type_name') + 'request_timeout', 'include_type_name') def put_template(self, name, body, params=None): """ Create an index template that will automatically be applied to new @@ -443,7 +443,7 @@ def put_template(self, name, body, params=None): :arg master_timeout: Specify timeout for connection to master :arg order: The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout :arg include_type_name: Specify whether requests and responses should include a type name (default: depends on Elasticsearch version). """ @@ -489,7 +489,7 @@ def get_template(self, name=None, params=None): return self.transport.perform_request('GET', _make_path('_template', name), params=params) - @query_params('master_timeout', 'timeout') + @query_params('master_timeout', 'request_timeout') def delete_template(self, name, params=None): """ Delete an index template by its name. @@ -497,7 +497,7 @@ def delete_template(self, name, params=None): :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout """ if name in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'name'.") @@ -830,7 +830,7 @@ def forcemerge(self, index=None, params=None): return self.transport.perform_request('POST', _make_path(index, '_forcemerge'), params=params) - @query_params('master_timeout', 'timeout', 'wait_for_active_shards') + @query_params('master_timeout', 'request_timeout', 'wait_for_active_shards') def shrink(self, index, target, body=None, params=None): """ The shrink index API allows you to shrink an existing index into a new @@ -849,7 +849,7 @@ def shrink(self, index, target, body=None, params=None): :arg body: The configuration for the target index (`settings` and `aliases`) :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout :arg wait_for_active_shards: Set the number of active shards to wait for on the shrunken index before the operation returns. """ @@ -859,7 +859,7 @@ def shrink(self, index, target, body=None, params=None): return self.transport.perform_request('PUT', _make_path(index, '_shrink', target), params=params, body=body) - @query_params('dry_run', 'master_timeout', 'timeout', + @query_params('dry_run', 'master_timeout', 'request_timeout', 'wait_for_active_shards', 'include_type_name') def rollover(self, alias, new_index=None, body=None, params=None): """ @@ -879,7 +879,7 @@ def rollover(self, alias, new_index=None, body=None, params=None): but not actually performed even if a condition matches. The default is false :arg master_timeout: Specify timeout for connection to master - :arg timeout: Explicit operation timeout + :arg request_timeout: Explicit operation timeout :arg wait_for_active_shards: Set the number of active shards to wait for on the newly created rollover index before the operation returns. :arg include_type_name: Specify whether requests and responses should include a