3

Here (at the end of table) example about using scrolls in elastic4s but I can not see any API to set scan parameter. Is it enabled by default or should be used with some hooks?

By the way

Or scan parameter is enabled by default during scrolling in elasticsearch?

Andrei Stefan
  • 51,654
  • 6
  • 98
  • 89
Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

4

You set the scan parameter when you do the initial search, 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 1.5.x releases of elastic4s)

sksamuel
  • 16,154
  • 8
  • 60
  • 108