code: protected void updateIndexOffline(I_CmsReport report, List<CmsPublishedResource> resourcesToIndex) {
  
          CmsObject cms = m_adminCms;
          try {
              // copy the administration context for the indexing
              cms = OpenCms.initCmsObject(m_adminCms);
              // set site root and project for this index
              cms.getRequestContext().setSiteRoot("/");
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
  
          Iterator<I_CmsSearchIndex> j = m_offlineIndexes.iterator();
          while (j.hasNext()) {
              I_CmsSearchIndex index = j.next();
              if (index.getSources() != null) {
                  try {
                      // switch to the index project
                      cms.getRequestContext().setCurrentProject(cms.readProject(index.getProject()));
                      updateIndexIncremental(cms, index, report, resourcesToIndex);
                  } catch (CmsException e) {
                      LOG.error(Messages.get().getBundle().key(Messages.LOG_UPDATE_INDEX_FAILED_1, index.getName()), e);
                  }
              }
          }
      }
docs: Updates the offline search indexes for the given list of resources.<p>
  
  @param report the report to write the index information to
  @param resourcesToIndex the list of {@link CmsPublishedResource} objects to index