Method: OpenSearch::API::Actions#scroll
- Defined in:
- lib/opensearch/api/actions/scroll.rb
#scroll(arguments = {}) ⇒ Object
Allows to retrieve a large numbers of results from a single search request.
*Deprecation notice*: A scroll id can be quite large and should be specified as part of the body Deprecated since version 7.0.0
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/opensearch/api/actions/scroll.rb', line 44 def scroll(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _scroll_id = arguments.delete(:scroll_id) method = if arguments[:body] OpenSearch::API::HTTP_POST else OpenSearch::API::HTTP_GET end path = if _scroll_id "_search/scroll/#{Utils.__listify(_scroll_id)}" else "_search/scroll" end params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |