class QuickSearchAPIController {

    @RequestMapping(value = "/quickSearch", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    public String quickSearch(
            @RequestParam(value = "q", required = true) String query,
            @RequestParam(value = "s", required = false, defaultValue = "") String sort,
            @RequestParam(value = "start", required = false, defaultValue = "0") int startRow,
            @RequestParam(value = "n", required = false, defaultValue = "10") int maxRows,
            Authentication authentication) throws MuleException
    {
        if (log.isDebugEnabled())
        {
            log.debug("User '" + authentication.getName() + "' is searching for '" + query + "'");
        }

        String q = SearchConstants.CATCH_ALL_QUERY + query;

        return getExecuteSolrQuery().getResultsByPredefinedQuery(authentication, SolrCore.QUICK_SEARCH, q, startRow,
                maxRows, sort);
    }

}