Elastic v2.6.1 Elastic.Scroller
Provides an API for working with Elastic Search’s Scroll API
Example
{:ok, pid} = Elastic.Scroller.start_link(%{index: "answer"})
# get the first "page" of results
Elastic.Scroller.results(pid)
# Request the second page
Elastic.Scroller.next_page(pid)
# get the second "page" of results
Elastic.Scroller.results(pid)
Then you can choose to kill the search context yourself… keeping in mind of course that Elastic Search will do this automatically after the keepalive (default of 1 minute) expires for the scroll.
Elastic.Scroller.clear(pid)
Summary
Functions
Fetches the next page of results and returns a scroll ID
Returns the results of the current scroll location
Starts an Elastic.Scroller server
Functions
Fetches the next page of results and returns a scroll ID.
To retrieve the results that come from this request, make a call to Elastic.Scroller.results/1
.
Elastic.Scroller.next_page(pid)
Returns the results of the current scroll location.
Elastic.Scroller.results(pid)