public String searchScroll(String scroll,String scrollId ) throws ElasticSearchException{
		if(!this.client.isV1()) {
			StringBuilder entity = new StringBuilder();
			entity.append("{\"scroll\" : \"").append(scroll).append("\",\"scroll_id\" : \"").append(scrollId).append("\"}");
			String result = this.client.executeHttp("_search/scroll",entity.toString(),ClientUtil.HTTP_GET);
			return result;
		}
		else {
			StringBuilder path = new StringBuilder();
			path.append("_search/scroll?scroll=").append( scroll ).append( "&scroll_id=" ).append( scrollId);
			String result = this.client.executeHttp(path.toString(), ClientUtil.HTTP_GET);
			return result;
		}
//		StringBuilder entity = new StringBuilder();
//		entity.append("{\"scroll\" : \"").append(scroll).append("\",\"scroll_id\" : \"").append(scrollId).append("\"}");
//		String result = this.client.executeHttp("_search/scroll",entity.toString(),ClientUtil.HTTP_GET);
//		return result;
	}
public String searchScroll ( String scroll , String scrollId ) throws ElasticSearchException { if ( ! this . client . isV1 ( ) ) { StringBuilder entity = new StringBuilder ( ) ; entity . append ( "{\"scroll\" : \"" ) . append ( scroll ) . append ( "\",\"scroll_id\" : \"" ) . append ( scrollId ) . append ( "\"}" ) ; String result = this . client . executeHttp ( "_search/scroll" , entity . toString ( ) , ClientUtil . HTTP_GET ) ; return result ; } else { StringBuilder path = new StringBuilder ( ) ; path . append ( "_search/scroll?scroll=" ) . append ( scroll ) . append ( "&scroll_id=" ) . append ( scrollId ) ; String result = this . client . executeHttp ( path . toString ( ) , ClientUtil . HTTP_GET ) ; return result ; } }
scroll search
https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-request-scroll.html
@param scroll
@param scrollId

@return
@throws ElasticSearchException