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) ----------- 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()