Elastic v2.6.1 Elastic.Scroll

Provides Elixir functions for ElasticSearch’s scroll endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html#search-request-scroll).

You should probably be using Elastic.Scroller instead.

Summary

Functions

Clears the specified scroll by calling this endpoint

Fetches the next batch of results from a specified scroll

Starts a new scroll using ElasticSearch’s scroll endpoint

Functions

clear(scroll_id)
clear(String.t | [String.t, ...]) ::
  {:ok, 200, map} |
  {:error, 404, map} |
  {:error, pos_integer, map}

Clears the specified scroll by calling this endpoint

    Elastic.Scroll.clear("<Base64 Scroll ID goes here>")

Can also be used to clear multiple scrolls at the same time:

    Elastic.Scroll.clear([
      "<Base64 Scroll ID goes here>",
      "<Base64 Scroll ID goes here>"
    ])
next(map)
next(%{scroll_id: String.t, keepalive: String.t}) ::
  {:ok, 200, map} |
  {:error, 404, map} |
  {:error, pos_integer, map}

Fetches the next batch of results from a specified scroll.

  Elastic.Scroll.next(%{
    scroll_id: "<a base64 scroll ID goes here>"
    keepalive: "1m"
  })
start(map)
start(%{index: String.t, body: map, size: pos_integer, keepalive: String.t}) ::
  {:ok, 200, map} |
  {:error, 404, map}

Starts a new scroll using ElasticSearch’s scroll endpoint.

  Elastic.Scroll.start(%{
    index: "answer",
    body: %{} # a query can go here
    size: 100,
    keepalive: "1m"
  })