Skip to content

Commit

Permalink
Deprecate the update_all_types option (#819)
Browse files Browse the repository at this point in the history
This option makes no sense on indices that have only one type, which is enforced since 6.0.
  • Loading branch information
dmvass authored and fxdgear committed Jul 16, 2018
1 parent d3204f6 commit dfd9e8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog

6.4.0 (dev)
-----------
* Removed deprecated option ``update_all_types``.

6.3.0 (2018-06-20)
-----------
Expand Down
9 changes: 2 additions & 7 deletions elasticsearch/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
"""
Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down

0 comments on commit dfd9e8d

Please sign in to comment.