Knowledge Base

Index Component Content via Setting in Search.config

As of InSite Search 2.8.x, you can set IncludeComponentContentInPage to true within an add tag in Search.config to index content within components.


Description

When a page contains referenced component xIDs, either through a component element or a component list element, the content within the referenced component is not indexed unless 1) pages are set to expand on publish or 2) components are embedded within pages. Prior to InSite Search 2.8.x, these were the only options; however, both solutions are expensive in terms of continual management.

As of InSite Search 2.8.x, you can set IncludeComponentContentInPage to true within an <add> tag in Search.config to index content within components. The component content is handled just like embedded component content, and the field names are the same.

Purpose

The IncludeComponentContentInPage parameter provides an efficient way for InSite Search to index content within components.

Step-by-Step

To configure Search.config to allow indexing within components:

  1. Navigate to the Search.config file. You will find Search.config in the root of the DSS project.
  2. Open Search.config in a text editor.
  3. Include the highlighted line (or change its value to true) in the indicated location within the Search.config:

    <add name="IncludeComponentContentInPage" value="true" />

    Include Component Content In Page in Search.config

  4. Save and close the file.
Note

If false, which is the default, content within components will not be indexed.

Additional Information

The following scenarios are handled:

  • Updating a page: This triggers the re-indexing to include all components.
  • Updating a component: This triggers the re-indexing of all pages that use the updated component.
  • Deleting a page: This triggers the removal of all of its component references.
  • Deleting a component: This triggers the removal of all of its page references.
    Note

    A full publish—not an incremental publish—is required to remove the component.

The following scenario is not handled:

  • Deleting a component without updating the page: This leaves broken component fields.
Note

The system will ignore SiteControl and SectionControl schema types to prevent repeated data from being re-indexed on all pages. This precaution reduces field load during indexing. If there are additional SiteControl and SectionControl schema types to exclude, you will need to use, for example, a customhook to add that schema type to the published SearchSource.config in the pubtarget folder prior to replication.

  • PRODUCT: InSite Search
  • Published: February 12, 2018
  • LAST UPDATED: September 18, 2023
  • Comments: 0

Please login to comment

Comments


There are no comments yet.