Skip to content

Commit e9bc900

Browse files
committed
Adding a missing 'create' param for put_template
1 parent d987546 commit e9bc900

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elasticsearch/client/indices.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def delete_alias(self, index, name, params=None):
417417
params=params)
418418
return data
419419

420-
@query_params('order', 'timeout', 'master_timeout', 'flat_settings')
420+
@query_params('create', 'order', 'timeout', 'master_timeout', 'flat_settings')
421421
def put_template(self, name, body, params=None):
422422
"""
423423
Create an index template that will automatically be applied to new
@@ -426,6 +426,8 @@ def put_template(self, name, body, params=None):
426426
427427
:arg name: The name of the template
428428
:arg body: The template definition
429+
:arg create: Whether the index template should only be added if new or
430+
can also replace an existing one
429431
:arg order: The order for this template when merging multiple matching
430432
ones (higher numbers are merged later, overriding the lower numbers)
431433
:arg master_timeout: Specify timeout for connection to master

0 commit comments

Comments
 (0)