} while(!(list = dao.readPage(appid, pager)).isEmpty());
}
// anything left after loop? index that too
if (brb.numberOfActions() > 0) {
resp = brb.execute().actionGet();
logger.info("rebuildIndex(): indexed {}, hasFailures: {}",
brb.numberOfActions(), resp.hasFailures());
}
// switch to alias NEW_INDEX -> ALIAS, OLD_INDEX -> X, deleting the old index