docs: public I_CmsDocumentFactory getDocumentFactory(CmsResource res) {
  
          if (isIndexing(res)) {
              if (OpenCms.getResourceManager().getResourceType(res) instanceof CmsResourceTypeXmlContainerPage) {
                  return OpenCms.getSearchManager().getDocumentFactory(
                      CmsSolrDocumentContainerPage.TYPE_CONTAINERPAGE_SOLR,
                      "text/html");
              }
              if (CmsResourceTypeXmlContent.isXmlContent(res)) {
                  return OpenCms.getSearchManager().getDocumentFactory(
                      CmsSolrDocumentXmlContent.TYPE_XMLCONTENT_SOLR,
                      "text/html");
              }
              return OpenCms.getSearchManager().getDocumentFactory(res);
          }
          return null;
      }