ElasticSearch: RestHighLevelClient is getting timeout exception if client API is idle for some time

Also probably this does not work:

searchRequest.scroll(scroll);

scroll is undefined.