String searchQuery = search.getSearchQuery();
logger.debug("search() {searchquery='"+searchQuery+"'}");
search.clearResults();
long s = (new Date()).getTime();
remoteHost = ActionContext.getActionContext().getRequest().getRemoteHost();
MailArchivaPrincipal cp = (MailArchivaPrincipal)ActionContext.getActionContext().getRequest().getUserPrincipal();
if (cp!=null) {
userName = cp.getName();
userRole = cp.getRole();
emailAddresses = cp.getEmailAddresses();
search.setUserName(userName);
search.setUserRole(userRole);
search.setEmailAddresses(emailAddresses);
audit.info("search email {query="+searchQuery.trim()+", remotehost="+remoteHost+", uname="+userName+"}");
SearchService.searchMessage(search);