The ArticlePreviewEnhancer of the example website implements WebsiteArticleReindexProviderEnhancerInterface and stores heading, subtitle, teaser, reading time and template of an article in metadata. enhanceQuery() requests extra columns, and enhanceDocument() builds the document. After changes you re-index.