// 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>();
}
}
//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) {
System.out.println("Found " + nSynced + " records to sync in chunk");