From 48a3bfb0eb6e7438635d8316130ee50f148c72fe Mon Sep 17 00:00:00 2001 From: Nick Lang Date: Wed, 22 May 2019 11:11:27 -0500 Subject: [PATCH 1/2] ml client has not method _bulk_body Need to access the _bulk_body method from the client object closes: #959 --- elasticsearch/client/xpack/ml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/client/xpack/ml.py b/elasticsearch/client/xpack/ml.py index 9fcb73479..dcccd53a5 100644 --- a/elasticsearch/client/xpack/ml.py +++ b/elasticsearch/client/xpack/ml.py @@ -224,7 +224,7 @@ def find_file_structure(self, body, params=None): "POST", "/_ml/find_file_structure", params=params, - body=self._bulk_body(body), + body=self.client._bulk_body(body), ) @query_params("advance_time", "calc_interim", "end", "skip_time", "start") @@ -634,7 +634,7 @@ def post_data(self, job_id, body, params=None): "POST", _make_path("_ml", "anomaly_detectors", job_id, "_data"), params=params, - body=self._bulk_body(body), + body=self.client._bulk_body(body), ) @query_params() From c007c814579dc62990bbe05acb01ca60c31a520a Mon Sep 17 00:00:00 2001 From: Nick Lang Date: Wed, 22 May 2019 11:13:51 -0500 Subject: [PATCH 2/2] update changelog too --- Changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog.rst b/Changelog.rst index 37d407c9b..e2d2125cd 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -5,6 +5,7 @@ Changelog 7.1.0 (dev) ----------- * Add connection parameter for Elastic Cloud cloud_id. + * ML client uses client object for _bulk_body requests 7.0.1 (2019-05019) -----------