Package com.dotcms.repackage.org.elasticsearch.client

Examples of com.dotcms.repackage.org.elasticsearch.client.Client.prepareSearchScroll()


          // setting up the search for all content
      SearchResponse scrollResp = client.prepareSearch(index).setSearchType(SearchType.SCAN).setQuery(QueryBuilders.matchAllQuery())
          .setSize(100).setScroll(TimeValue.timeValueMinutes(2)).execute().actionGet();
      while (true) {
        scrollResp = client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(TimeValue.timeValueMinutes(2)).execute()
            .actionGet();
        boolean hitsRead = false;
        for (SearchHit hit : scrollResp.getHits()) {
          bw.write(hit.getId());
          bw.write(JSON_RECORD_DELIMITER);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.