LOG.info("Submitting bulk index of " + numDocs + " products.");
if (LOG.isDebugEnabled()) {
LOG.debug(bulk.toString());
}
JresBulkReply bulkReply = jres.quest(new JresBulk(targetIndex, targetType, bulk));
List<JresBulkItemResult> results = Lists.newArrayList(bulkReply.getResults());
assert futures.size() == results.size();
for (int i = 0; i < results.size(); i++) {
SettableFuture<JresBulkItemResult> future = futures.get(i);
JresBulkItemResult result = results.get(i);