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

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


                        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


                        bulk.add(client.prepareDelete(info.working, "content", id));
                        if(info.reindex_working!=null)
                            bulk.add(client.prepareDelete(info.reindex_working, "content", id));
                    }

                      bulk.execute().actionGet();

                }
                catch(Exception ex) {
                    throw new ElasticSearchException(ex.getMessage(),ex);
                }
View Full Code Here

                    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 {
                jsons.clear();
View Full Code Here

        //bulkRequest.add(client.prepareIndex(ESIndexAPI.ES_INDEX_NAME, type, c.getInode()).setSource(
        //    new ESMappingAPIImpl().toJson(c)));

      }
      BulkResponse bulkResponse = bulkRequest.execute().actionGet();
      if (bulkResponse.hasFailures()) {
        Logger.error(this.getClass(), bulkResponse.buildFailureMessage());
      }

   
View Full Code Here

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

      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.