From cab17fd4496bc38ba0e335b5c90572aac33c5b68 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilishin Date: Mon, 25 Jun 2018 21:02:25 +0300 Subject: [PATCH] Remove put_template and get_template endpoints (#803) In ES 6.0 the search template system has changed over to stored scripts. --- elasticsearch/client/__init__.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 31af6e2b..5c0b65d1 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -1308,34 +1308,6 @@ class Elasticsearch(object): return self.transport.perform_request('GET', _make_path('_scripts', id), params=params) - @query_params() - def put_template(self, id, body, params=None): - """ - Create a search template. - ``_ - - :arg id: Template ID - :arg body: The document - """ - for param in (id, body): - if param in SKIP_IN_PATH: - raise ValueError("Empty value passed for a required argument.") - return self.transport.perform_request('PUT', _make_path('_search', - 'template', id), params=params, body=body) - - @query_params() - def get_template(self, id, params=None): - """ - Retrieve a search template. - ``_ - - :arg id: Template ID - """ - if id in SKIP_IN_PATH: - raise ValueError("Empty value passed for a required argument 'id'.") - return self.transport.perform_request('GET', _make_path('_search', - 'template', id), params=params) - @query_params() def delete_script(self, id, params=None): """