We create custom index for the below reasons:
- Fast responses.
- Index only content items which are required.
- Can change the indexing strategies based on the requirement.
- Manual indexing becomes easy because we don’t need to index whole tree to accommodate new items.
Steps to create and index the new/custom search index
- Go to the SOLR folder (in my case: D:\Sitecore Demo\solr-7.7.2)
- Navigate to Solr folder (D:\Sitecore Demo\solr-7.7.2\server\solr) where all cores are listed.
- Copy the “SitecoreDemo_web_index” folder and paste. Rename the new folder as “SitecoreDemo_custom_index”.
- Access the folder.
- Edit the core.properties file and change the name attribute to “SitecoreDemo_custom_index”.
- Go to Solr services in services.msc (in my case: SOLR7.2). Restart the service.
- We are almost done, let’s create the config file for our new Core.
- Go to the App_Config folder in our Sitecore instance (in my case : C:\inetpub\wwwroot\SitecoreDemo.sc\App_Config)
- Navigate to Content Search folder inside Sitecore folder (C:\inetpub\wwwroot\SitecoreDemo.sc\App_Config\Sitecore\ContentSearch)
- Copy the “Sitecore.ContentSearch.Solr.Index.Web.config” file and paste it. Rename the new file to “Sitecore.ContentSearch.Solr.Index.Custom.config”
- Edit the file and the values highlighted below:
- Save the file.
- Recycle the app-pool.
- Access the control panel in Sitecore >> Indexing Manager.
- The new core is visible in the indexing manager and we can rebuild the indexes for the same.
Thank you.. Keep Learning.. Keep Sitecoring.. 🙂
One thought on “How to create a Custom Search Index in Sitecore 9.2”
I have to thank you for the efforts you’ve put in penning this site. I really hope to view the same high-grade content from you in the future as well. In truth, your creative writing abilities has inspired me to get my own site now 😉
LikeLiked by 1 person