Area: Episerver Find
Applies to versions: 12 and higher
Other versions:

Related content and dependencies

This topic provides examples of how to index content that is related to eachother, for example child content in a content structure.

Indexing related content

Sometimes you need to index not only the saved/published content, but also related content to preserve consistency in the index. One such case may be if you have indexed the child count for content and want to have it updated whenever "child content" is published.


To index related content, set the RelatedContent convention to return the parent content when indexing. This way the parent content is reindexed and its child count updated.

  .RelatedContent(x =>
      var relatedContent = new List<IContent>();
      if (!(x.ContentLink.CompareToIgnoreWorkID(ContentReference.StartPage) || 
      return relatedContent;

Note: This functionality is not related to finding content with similar or related content. For such functionality, see the MoreLike method documentation.

Last updated: Oct 31, 2016