params.addParam(PARAM.LANG, locale.getLanguage());
PageManager<ISearchResults> paginator = new PageManager<ISearchResults>();
paginator.setStart((page - 1) * paginator.getOffset());
params.addParam(PARAM.START, String.valueOf(paginator.getStart()));
this.serviceLocator.getSearchEngine().search(terms, params);
ISearchResults results = this.serviceLocator.getSearchEngine().getSearchResults();
paginator.setCollection((Collection) results);
try {
paginator.setSize(Long.parseLong(results.getTotalResults()));
} catch (Exception e) {
paginator.setSize(0);
}
model.addAttribute("paginator", paginator);
} catch (Exception e) {