code: public I_CmsDocumentFactory getDocumentFactory(String resourceType, String mimeType) {
  
          I_CmsDocumentFactory result = null;
          if (resourceType != null) {
              // create the factory lookup key for the document
              String documentTypeKey = A_CmsVfsDocument.getDocumentKey(resourceType, mimeType);
              // check if a setting is available for this specific MIME type
              result = m_documentTypes.get(documentTypeKey);
              if (result == null) {
                  // no setting is available, try to use a generic setting without MIME type
                  result = m_documentTypes.get(A_CmsVfsDocument.getDocumentKey(resourceType, null));
                  // please note: the result may still be null
              }
          }
          return result;
      }
docs: Returns a lucene document factory for given resource type and MIME type.<p>
  
  The type of the document factory is selected  according to the configuration
  in <code>opencms-search.xml</code>.<p>
  
  @param resourceType the resource type name
  @param mimeType the MIME type
  
  @return a lucene document factory or null in case no matching factory was found