class SearchController {

    @RequestMapping(value = "/search", method = RequestMethod.GET)
    public void searchAndZip(@RequestParam("text") final String searchedText, final HttpServletResponse resp) {
        if (searchedText != null && !"".equals(searchedText)) {
            List<List<String>> searchResult;
            try {
                searchResult = searchForText(searchedText);
            } catch (QueryCannotBeParsedException e) {
                logger.warn("Invalid query");
                searchResult = new ArrayList<List<String>>();
            }
            zipSearchResult(searchedText, resp, searchResult);
        }
    }

}