code: public void setIndex(String indexName) throws CmsException {
  
          if (CmsStringUtil.isEmpty(indexName)) {
              throw new CmsException(Messages.get().container(Messages.ERR_INDEXSOURCE_CREATE_MISSING_NAME_0));
          }
          CmsSolrIndex index = OpenCms.getSearchManager().getIndexSolr(indexName);
          if (index == null) {
              throw new CmsException(Messages.get().container(Messages.ERR_INDEX_NOT_FOUND_1, indexName));
          }
  
          m_index = index;
  
      }
docs: Set the name of the index to search.<p>
  
  A former search result will be deleted.<p>
  
  @param indexName the name of the index
  
  @throws CmsException if the index was not found