diff --git a/elasticsearch_dsl/update_by_query.py b/elasticsearch_dsl/update_by_query.py index 9b89f62b..dd11856b 100644 --- a/elasticsearch_dsl/update_by_query.py +++ b/elasticsearch_dsl/update_by_query.py @@ -154,6 +154,6 @@ def execute(self): self._response = self._response_class( self, - es.update_by_query(index=self._index, body=self.to_dict(), **self._params), + es.update_by_query(index=self._index, **self.to_dict(), **self._params), ) return self._response diff --git a/tests/test_update_by_query.py b/tests/test_update_by_query.py index c10fde87..9ebc891e 100644 --- a/tests/test_update_by_query.py +++ b/tests/test_update_by_query.py @@ -141,9 +141,7 @@ def test_params_being_passed_to_search(mock_client): ubq = ubq.params(routing="42") ubq.execute() - mock_client.update_by_query.assert_called_once_with( - index=None, body={}, routing="42" - ) + mock_client.update_by_query.assert_called_once_with(index=None, routing="42") def test_overwrite_script():