if (req.getMapReduceWrapper() != null) {
result.setMapReduceResult(req.getMapReduceWrapper().getResult());
}
BrowseHit[] hits = null;
try {
hits = collector.topDocs();
} catch (IOException e) {
logger.error(e.getMessage(), e);
result.addError(e.getMessage());
hits = new BrowseHit[0];
}