Elastic.Scroll (Elastic v3.7.0) View Source
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.
Link to this section 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.
Link to this section Functions
Specs
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>"
]) Specs
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"
}) Specs
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"
})