def start_scroll( opts = {} )
      opts = opts.merge action: "search.start_scroll", rest_api: "search"
      response = get "{/index}{/type}/_search", opts
      response.body
    end
def start_scroll( opts = {} )
      opts = opts.merge action: "search.start_scroll", rest_api: "search"
      response = get "{/index}{/type}/_search", opts
      response.body
    end
Begin scrolling a query.
 See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html

 opts   - Options Hash
   :body        - the query to scroll as a Hash or JSON encoded String
   :index       - the name of the index to search
   :type        - the document type to search
   :scroll      - the keep alive time of the scrolling request (5 minutes by default)
   :size        - the number of documents per shard to fetch per scroll
   :search_type - set to 'scan' for scan semantics  # DEPRECATED in ES 2.1.0 - use a Scroll query sorted by _doc: https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-search-type.html#scan

 Examples

   h = client.start_scroll(body: '{"query":{"match_all":{}},"sort":{"created":"desc"}}', index: 'test')
   scroll_id = h['_scroll_id']
   h['hits']['hits'].each { |doc| ... }

   h = client.continue_scroll(scroll_id)
   scroll_id = h['_scroll_id']
   h['hits']['hits'].each { |doc| ... }

   # repeat until there are no more hits

 Returns the response body as a Hash.