public boolean processSearch(Model model, SearchForm searchForm) {
        ArrayList<UserInfo> result= new ArrayList<UserInfo>();
        if (isEmail(searchForm.getQuery())){
            try {
                result.add(userFacade.getByEmail(searchForm.getQuery()));
                model.addAttribute("id",result.get(0).getId());
                model.addAttribute("result",result);
                return true;
            } catch (NoEmailException e) {
                model.addAttribute("message","No matches found.");
                return false;
            }
        }
        if (isNumber(searchForm.getQuery())){
            Long id = new Long(searchForm.getQuery());
            try {
                result.add(userFacade.getById(id));
                model.addAttribute("result",result);
                return true;
            } catch (NoIdException e) {
                model.addAttribute("message","No matches found.");
                return false;
            }
        }
        model.addAttribute("error","Incorrect query.");
        return false;

    }