code: public I_CmsSearchDocument createDocument(
          CmsObject cms,
          CmsResource resource,
          I_CmsSearchIndex index,
          I_CmsExtractionResult extraction)
      throws CmsException {
  
          m_index = (CmsSearchIndex)index;
  
          I_CmsSearchDocument document = m_index.createEmptyDocument(resource);
  
          List<CmsProperty> propertiesSearched = cms.readPropertyObjects(resource, true);
          List<CmsProperty> properties = cms.readPropertyObjects(resource, false);
  
          document = appendContentBlob(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendPath(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendType(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendFileSize(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendDates(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendLocales(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendProperties(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendCategories(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendFieldMappings(document, cms, resource, extraction, properties, propertiesSearched);
          document = appendAdditionalValuesToDcoument(
              document,
              cms,
              resource,
              extraction,
              properties,
              propertiesSearched);
  
          return document;
      }
docs: Creates the Lucene Document with this field configuration for the provided VFS resource, search index and content.<p>
  
  This triggers the indexing process for the given VFS resource according to the configuration
  of the provided index.<p>
  
  The provided index resource contains the basic contents to index.
  The provided search index contains the configuration what to index, such as the locale and
  possible special field mappings.<p>
  
  @param cms the OpenCms user context used to access the OpenCms VFS
  @param resource the resource to create the Lucene document from
  @param index the search index to create the Document for
  @param extraction the plain text content extracted from the document
  
  @return the Search Document for the given VFS resource and the given search index
  
  @throws CmsException if something goes wrong