Method: Elasticsearch::API::Actions#clear_scroll
- Defined in:
- lib/elasticsearch/api/actions/clear_scroll.rb
#clear_scroll(arguments = {}) ⇒ Object
Clear a scrolling search. Clear the search context and results for a scrolling search.
*Deprecation notice*: A scroll id can be quite large and should be specified as part of the body Deprecated since version 7.0.0
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/elasticsearch/api/actions/clear_scroll.rb', line 51 def clear_scroll(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'clear_scroll' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _scroll_id = arguments.delete(:scroll_id) method = Elasticsearch::API::HTTP_DELETE path = '_search/scroll' params = Utils.process_params(arguments) if Array(arguments[:ignore]).include?(404) Utils.rescue_from_not_found do Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end else Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end end |