Skip to content

Commit 40e1632

Browse files
authored
Stop mixing body and parameters in UpdateByQuery (elastic#1702)
1 parent 6ab664d commit 40e1632

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

elasticsearch_dsl/update_by_query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ def execute(self):
154154

155155
self._response = self._response_class(
156156
self,
157-
es.update_by_query(index=self._index, body=self.to_dict(), **self._params),
157+
es.update_by_query(index=self._index, **self.to_dict(), **self._params),
158158
)
159159
return self._response

tests/test_update_by_query.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ def test_params_being_passed_to_search(mock_client):
141141
ubq = ubq.params(routing="42")
142142
ubq.execute()
143143

144-
mock_client.update_by_query.assert_called_once_with(
145-
index=None, body={}, routing="42"
146-
)
144+
mock_client.update_by_query.assert_called_once_with(index=None, routing="42")
147145

148146

149147
def test_overwrite_script():

0 commit comments

Comments
 (0)