Create a search index that applies to group of pages
By default, when you create search indexes in Sitefinity CMS, you cannot specify the pages to which the search index applies. Sitefinity CMS indexes the content of all pages. You can create a search index that applies only to a selection of pages under a group page by replacing the default
PageInboundPipe with a custom one.
To achieve this, perform the following:
- Create a
PageInboundPipeCustom.cs class, which inherits from the default
- In the
PageInboundPipeCustom.cs class, override the
PushData() method. With this method, you get the pages under the group page that you want to include in the internal search and pass them to the base
- To replace the default
PageInboundPipe with the custom one, you need to unregister the default pipe and register the custom one in your
- Build the solution and restart the application.