Sitecore: Indexing Associated Content
Setting up indexes and indexing content for site search in Sitecore is a pretty straightforward task and there is an extensive knowledge base put together by the community with various examples. One useful construct we often find ourselves implementing for keyword search is setting up a computed field . I typically use this construct to index any additional content referenced by a page, typically (content blocks, promos, callouts) added to the page via presentation details The Need: Index externally reference content by a page item Solve: Create a computed field to index TextField and HtmlText type fields of referenced items This implementation fetches all the renderings for the current item's presentation for the default device and checks their datasource item for index-able content. As a suggestion, check if the current item inherits from certain page templates else skip the execution. Step1: Create a class and implemented the IComputedIndexField interface as shown below: pu