Skip to content

Commit

Permalink
ml client has no method _bulk_body (#962)
Browse files Browse the repository at this point in the history
* ml client has not method _bulk_body

Need to access the _bulk_body method from the client object

closes: #959

* update changelog too
  • Loading branch information
fxdgear authored May 23, 2019
1 parent 60d2548 commit a5d27e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-----------
Expand Down
4 changes: 2 additions & 2 deletions elasticsearch/client/xpack/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a5d27e3

Please sign in to comment.