Package com.dotcms.repackage.org.elasticsearch.action.bulk

Examples of com.dotcms.repackage.org.elasticsearch.action.bulk.BulkRequestBuilder.numberOfActions()


                    if(deps)
                        contentToIndex.addAll(loadDeps(content));
                   
                    indexContentletList(req, contentToIndex,reindexOnly);
                                       
                    if(bulk==null && req.numberOfActions()>0)
                        req.execute().actionGet();

                } catch (Exception e) {
                    Logger.error(ESContentFactoryImpl.class, e.getMessage(), e);
                }
View Full Code Here


                    String json = raw.substring(delimidx + JSON_RECORD_DELIMITER.length(), raw.length());
                    if (id != null)
                        req.add(new IndexRequest(index, type, id).source(json));
                  }
              }
                if(req.numberOfActions()>0) {
                    req.execute().actionGet();
                    //client.admin().indices().flush(new FlushRequest(index)).actionGet();
                }
            }
            finally {
View Full Code Here

                    Logger.error(this, e.getMessage(), e);
                  }
                    }
            }
            HibernateUtil.closeSession();
                if(bulk.numberOfActions()>0) {
                    bulk.execute(new ActionListener<BulkResponse>() {
                        void deleteRecords() {
                            addRecordsToDelete(recordsToDelete);
                        }
                                public void onResponse(BulkResponse resp) {
View Full Code Here

      BulkRequestBuilder bulk=new ESClient().getClient().prepareBulk();
      for(Contentlet cont : contentlets) {
          permissionCache.remove(cont.getPermissionId());
          indexAPI.addContentToIndex(cont, false, true, true, bulk);
      }
      if(bulk.numberOfActions()>0)
          bulk.execute().actionGet();

      offset=offset+limit;
    } while(contentlets.size()>0);
  }
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.