code: public boolean removeSearchIndexSource(CmsSearchIndexSource indexsource) throws CmsIllegalStateException {
  
          // validation if removal will be granted
          Iterator<I_CmsSearchIndex> itIndexes = m_indexes.iterator();
          I_CmsSearchIndex idx;
          // the list for collecting indexes that use the given index source
          List<I_CmsSearchIndex> referrers = new ArrayList<I_CmsSearchIndex>();
          // the current list of referred index sources of the iterated index
          List<CmsSearchIndexSource> refsources;
          while (itIndexes.hasNext()) {
              idx = itIndexes.next();
              refsources = idx.getSources();
              if (refsources != null) {
                  if (refsources.contains(indexsource)) {
                      referrers.add(idx);
                  }
              }
          }
          if (referrers.size() > 0) {
              throw new CmsIllegalStateException(
                  Messages.get().container(
                      Messages.ERR_INDEX_SOURCE_DELETE_2,
                      indexsource.getName(),
                      referrers.toString()));
          }
  
          // remove operation (no exception)
          return m_indexSources.remove(indexsource.getName()) != null;
  
      }
docs: Removes this indexsource from the OpenCms configuration (if it is not used any more).<p>
  
  @param indexsource the indexsource to remove from the configuration
  
  @return true if remove was successful, false if preconditions for removal are ok but the given
  searchindex was unknown to the manager.
  
  @throws CmsIllegalStateException if the given indexsource is still used by at least one
  <code>{@link I_CmsSearchIndex}</code>.