code: private CmsSearch getSearchBean(Map<String, String> params) {
  
          if (m_searchBean == null) {
              m_searchBean = new CmsSearch();
              m_searchBean.init(getWp().getCms());
              m_searchBean.setParameters(getSearchParameters(params));
              if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_searchBean.getIndex())) {
                  m_searchBean.setIndex(getWp().getSettings().getUserSettings().getWorkplaceSearchIndexName());
              }
              m_searchBean.setMatchesPerPage(getWp().getSettings().getUserSettings().getExplorerFileEntries());
              m_searchBean.setSearchPage(Integer.parseInt(params.get(I_CmsListResourceCollector.PARAM_PAGE)));
              // set search roots
              List<String> resources = getResourceNamesFromParam(params);
              String[] searchRoots = new String[resources.size()];
              resources.toArray(searchRoots);
              for (int i = 0; i < searchRoots.length; i++) {
                  searchRoots[i] = getWp().getCms().addSiteRoot(searchRoots[i]);
              }
              m_searchBean.setSearchRoots(searchRoots);
          } else {
              int page = Integer.parseInt(params.get(I_CmsListResourceCollector.PARAM_PAGE));
              if (m_searchBean.getSearchPage() != page) {
                  m_searchBean.setSearchPage(page);
                  m_searchResults = null;
              }
          }
          return m_searchBean;
      }
docs: Returns the search bean object.<p>
  
  @param params the parameter map
  
  @return the used search bean