code: protected Context initializeRequest(HttpServletRequest req, HttpServletResponse res)
      throws CmsException, Exception, CmsSearchException, IOException {
  
          Context context = new Context();
          context.m_cms = getCmsObject(req);
          context.m_params = CmsRequestUtil.createParameterMap(req.getParameterMap());
          context.m_index = CmsSearchManager.getIndexSolr(context.m_cms, context.m_params);
  
          if (context.m_index != null) {
              context.m_query = new CmsSolrQuery(context.m_cms, context.m_params);
          } else {
              res.setStatus(HttpServletResponse.SC_BAD_REQUEST);
              if (LOG.isInfoEnabled()) {
                  String indexName = context.m_params.get(PARAM_CORE) != null
                  ? context.m_params.get(PARAM_CORE)[0]
                  : (context.m_params.get(PARAM_INDEX) != null ? context.m_params.get(PARAM_INDEX)[0] : null);
                  LOG.info(Messages.get().getBundle().key(Messages.GUI_SOLR_INDEX_NOT_FOUND_1, indexName));
              }
          }
  
          return context;
      }
docs: Initialized the search request and sets the local parameter.<p>
  
  @param req the servlet request
  @param res the servlet response
  
  @return the generated context
  
  @throws CmsException if something goes wrong
  @throws Exception if something goes wrong
  @throws CmsSearchException if something goes wrong
  @throws IOException if something goes wrong