brb.add(getClient().prepareIndex(appid, obj.getType(), obj.getId()).
setSource(Utils.getAnnotatedFields(obj)));
pager.setLastKey(obj.getId());
}
// bulk index 1000 objects
if (brb.numberOfActions() > 100) {
resp = brb.execute().actionGet();
logger.info("rebuildIndex(): indexed {}, hasFailures: {}",
brb.numberOfActions(), resp.hasFailures());
}
} while(!(list = dao.readPage(appid, pager)).isEmpty());