From dfd9e8d3721d01242f99df1b84f622a46c0425c4 Mon Sep 17 00:00:00 2001 From: Dmitri Vasilishin Date: Mon, 16 Jul 2018 20:30:22 +0300 Subject: [PATCH] Deprecate the `update_all_types` option (#819) This option makes no sense on indices that have only one type, which is enforced since 6.0. --- Changelog.rst | 1 + elasticsearch/client/indices.py | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Changelog.rst b/Changelog.rst index 440c244c2..a55f1e8d8 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -5,6 +5,7 @@ Changelog 6.4.0 (dev) ----------- + * Removed deprecated option ``update_all_types``. 6.3.0 (2018-06-20) ----------- diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index d7389e1f8..8adaf9db3 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -69,8 +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', 'update_all_types', - 'wait_for_active_shards') + @query_params('master_timeout', 'timeout', 'wait_for_active_shards') def create(self, index, body=None, params=None): """ Create an index in Elasticsearch. @@ -80,8 +79,6 @@ def create(self, index, body=None, params=None): :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 update_all_types: Whether to update the mapping for all fields with - the same name across all types or not :arg wait_for_active_shards: Set the number of active shards to wait for before the operation returns. """ @@ -240,7 +237,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', 'update_all_types') + 'master_timeout', 'timeout') def put_mapping(self, doc_type, body, index=None, params=None): """ Register specific mapping definition for a specific type. @@ -261,8 +258,6 @@ def put_mapping(self, doc_type, body, index=None, params=None): ignored when unavailable (missing or closed) :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout - :arg update_all_types: Whether to update the mapping for all fields with - the same name across all types or not """ for param in (doc_type, body): if param in SKIP_IN_PATH: