code: @Override
      public I_CmsSearchDocument createDocument(CmsObject cms, CmsResource resource, I_CmsSearchIndex index)
      throws CmsException {
  
          // extract the content from the resource
          I_CmsExtractionResult content = null;
  
          if (index.isExtractingContent()) {
              // do full text content extraction only if required
  
              try {
                  content = extractContent(cms, resource, index);
              } catch (Exception e) {
                  // text extraction failed for document - continue indexing meta information only
                  LOG.error(Messages.get().getBundle().key(Messages.ERR_TEXT_EXTRACTION_1, resource.getRootPath()), e);
              }
          }
  
          // create the Lucene document according to the index field configuration
          return index.getFieldConfiguration().createDocument(cms, resource, index, content);
      }
docs: Generates a new lucene document instance from contents of the given resource for the provided index.<p>
  
  For container pages, we must not cache based on the container page content age,
  since the content of the included elements may change any time.