lib/elasticsearch/api/actions/async_search/delete.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/async_search/delete.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -22,18 +22,19 @@
# Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
#
# @option arguments [String] :id The async search ID
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/async-search.html
#
def delete(arguments = {})
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = nil
+
+ arguments = arguments.clone
_id = arguments.delete(:id)
method = Elasticsearch::API::HTTP_DELETE
path = "_async_search/#{Utils.__listify(_id)}"