Multi-Root Crawling

In certain scenarios, you might want to index multiple root items on your Sitecore content tree. This is a common request in Sitecore, and the SearchStax Site Search solution for Sitecore supports it.

Let's assume you've got the following example and want to index everything under Home/About and everything under Home/Bios, but not the other items.

Sitecore content tree showing multiple root items including About and Bios sections highlighted in the navigation hierarchy.

Configuring Multiple Roots

Open the /App_Config/Modules/SearchStax/SearchStax.Connector.Provider.config configuration file and locate your index. You'll have a node which contains a list of nodes as children.

XML configuration shows a web crawler setup with the root path set to /sitecore/content/home.

Start by changing the of the already existing crawler if needed. Then copy and paste the entire node and change the value for this new one too. You might end up with something like this:

Two crawler configurations in XML showing different root paths:

Rebuilding the Index

Like any other configuration change in Sitecore, this will restart your application. Wait until Sitecore is responsive again. Then open the Indexing Manager to rebuild your index:

Indexing Manager dialog showing a list of search indexes with rebuild options and detailed index statistics for each selected item.

Verifying the Results

Once the rebuild is done, you can open your search page and confirm that only items under those two roots are being indexed:

Search results page showing 8 sample items including Home, About, Team, History, and individual team member entries.
Articles in this section