Ejemplo n.º 1
0
 private void processScroll(InternalScrollSearchRequest request, SearchContext context) {
   // process scroll
   context.from(context.from() + context.size());
   context.scroll(request.scroll());
   // update the context keep alive based on the new scroll value
   if (request.scroll() != null && request.scroll().keepAlive() != null) {
     context.keepAlive(request.scroll().keepAlive().millis());
   }
 }
 public static InternalScrollSearchRequest internalScrollSearchRequest(
     long id, SearchScrollRequest request) {
   InternalScrollSearchRequest internalRequest = new InternalScrollSearchRequest(id);
   internalRequest.scroll(request.scroll());
   return internalRequest;
 }