code: 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;
      }
docs: Returns the document type factory used for the given resource in this index, or <code>null</code>
  in case the resource is not indexed by this index.<p>
  
  A resource is indexed if the following is all true: <ol>
  <li>The index contains at last one index source matching the root path of the given resource.
  <li>For this matching index source, the document type factory needed by the resource is also configured.
  </ol>
  
  This default implementation uses the check as internal Solr indexes do. Overwrite it if necessary.
  
  @param res the resource to check
  
  @return the document type factory used for the given resource in this index, or <code>null</code>
  in case the resource is not indexed by this index