code: public void rebuildIndexes(List<String> indexNames, I_CmsReport report) throws CmsException {
  
          try {
              SEARCH_MANAGER_LOCK.lock();
              Iterator<String> i = indexNames.iterator();
              while (i.hasNext()) {
                  String indexName = i.next();
                  // get the search index by name
                  I_CmsSearchIndex index = getIndex(indexName);
                  if (index != null) {
                      // update the index
                      updateIndex(index, report, null);
                  } else {
                      if (LOG.isWarnEnabled()) {
                          LOG.warn(Messages.get().getBundle().key(Messages.LOG_NO_INDEX_WITH_NAME_1, indexName));
                      }
                  }
              }
              // clean up the extraction result cache
              cleanExtractionCache();
          } finally {
              SEARCH_MANAGER_LOCK.unlock();
          }
      }
docs: Rebuilds (if required creates) the List of indexes with the given name.<p>
  
  @param indexNames the names (String) of the index to rebuild
  @param report the report object to write messages (or <code>null</code>)
  
  @throws CmsException if something goes wrong