On your initial search, you are setting a parameter scan
, so:
client.execute {
search in "index" / "type" query <somequery> searchType SearchType.Scan scroll "1m"
}
Then later
client.execute {
search scroll <id> keepAlive "1m"
}
(taken from the 1.5.x releases of elastic 4)
source
to share