Examples of bulkAddDocuments()


Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.bulkAddDocuments()

      nSynced++;
     
      // Add the entities
      if ( entities.size() > 1000 )
      {
        elasticManager.bulkAddDocuments(
            IndexManager.mapListToIndex(entities, EntityFeaturePojo.listType(), new EntityFeaturePojoIndexMap()),
            "_id", null, true);
          // (note EntityFeaturePojoIndexMap creates an "_id" field of the format index:community)
       
        entities = new ArrayList<EntityFeaturePojo>();
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.bulkAddDocuments()

       
        entities = new ArrayList<EntityFeaturePojo>();
      }
    }
    //write whatevers left
    elasticManager.bulkAddDocuments(
        IndexManager.mapListToIndex(entities, EntityFeaturePojo.listType(), new EntityFeaturePojoIndexMap()),
        "_id", null, true);
      // (note EntityFeaturePojoIndexMap creates an "_id" field of the format index:community)
   
    if (null != chunk) {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.bulkAddDocuments()

      events.add(evt);
      nSynced++;
         
      if ( events.size() > 1000 )
      {
        elasticManager.bulkAddDocuments(IndexManager.mapListToIndex(events, AssociationFeaturePojo.listType(), new AssociationFeaturePojoIndexMap()), "_id", null,true);
        events.clear();
      }
    }
     // End loop over entities
   
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.bulkAddDocuments()

      }
    }
     // End loop over entities
   
    //write whatevers left
    elasticManager.bulkAddDocuments(IndexManager.mapListToIndex(events, AssociationFeaturePojo.listType(), new AssociationFeaturePojoIndexMap()), "_id", null,true);
   
    if (null != chunk) {
      System.out.println("Found " + nSynced + " records to sync in chunk");
    }       
  }
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.bulkAddDocuments()

   
    ElasticSearchManager indexManager = IndexManager.createIndex("test", null, false, null, null, ImmutableSettings.settingsBuilder());
   
    BulkResponse result = null;
    // All docs
    result = indexManager.bulkAddDocuments(IndexManager.mapListToIndex(docset, new TypeToken<Set<DocumentPojo>>(){},
                                  new DocumentPojoIndexMap()), "_id", null, true);
    if (result.hasFailures()) {
      System.out.print("****** FAILED: ");
      System.out.println(result.buildFailureMessage());
    }
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.