Skip to content

Commit a5d27e3

Browse files
authored
ml client has no method _bulk_body (#962)
* ml client has not method _bulk_body Need to access the _bulk_body method from the client object closes: #959 * update changelog too
1 parent 60d2548 commit a5d27e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Changelog
55
7.1.0 (dev)
66
-----------
77
* Add connection parameter for Elastic Cloud cloud_id.
8+
* ML client uses client object for _bulk_body requests
89

910
7.0.1 (2019-05019)
1011
-----------

elasticsearch/client/xpack/ml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def find_file_structure(self, body, params=None):
224224
"POST",
225225
"/_ml/find_file_structure",
226226
params=params,
227-
body=self._bulk_body(body),
227+
body=self.client._bulk_body(body),
228228
)
229229

230230
@query_params("advance_time", "calc_interim", "end", "skip_time", "start")
@@ -634,7 +634,7 @@ def post_data(self, job_id, body, params=None):
634634
"POST",
635635
_make_path("_ml", "anomaly_detectors", job_id, "_data"),
636636
params=params,
637-
body=self._bulk_body(body),
637+
body=self.client._bulk_body(body),
638638
)
639639

640640
@query_params()

0 commit comments

Comments
 (0)