code: public void addSearchIndex(I_CmsSearchIndex searchIndex) {
  
          if (!searchIndex.isInitialized()) {
              if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
                  try {
                      searchIndex.initialize();
                  } catch (CmsException e) {
                      // should never happen
                      LOG.error(e.getMessage(), e);
                  }
              }
          }
  
          // name: not null or emtpy and unique
          String name = searchIndex.getName();
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
              throw new CmsIllegalArgumentException(
                  Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_MISSING_NAME_0));
          }
          if (m_indexSources.keySet().contains(name)) {
              throw new CmsIllegalArgumentException(
                  Messages.get().container(Messages.ERR_SEARCHINDEX_CREATE_INVALID_NAME_1, name));
          }
  
          m_indexes.add(searchIndex);
          if (m_adminCms != null) {
              initOfflineIndexes();
          }
  
          if (CmsLog.INIT.isInfoEnabled()) {
              CmsLog.INIT.info(
                  Messages.get().getBundle().key(
                      Messages.INIT_ADD_SEARCH_INDEX_2,
                      searchIndex.getName(),
                      searchIndex.getProject()));
          }
      }
docs: Adds a search index to the configuration.<p>
  
  @param searchIndex the search index to add