lib/elasticsearch/api/actions/update_by_query.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/update_by_query.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -54,18 +54,19 @@
# @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle.
# @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The search definition using the Query DSL
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/docs-update-by-query.html
#
def update_by_query(arguments = {})
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
- body = arguments.delete(:body)
+ body = arguments.delete(:body)
+
+ arguments = arguments.clone
_index = arguments.delete(:index)
method = Elasticsearch::API::HTTP_POST
path = "#{Utils.__listify(_index)}/_update_by_query"