Overview
If your site's search feature is returning incorrect results, it could be the result of corrupt data in your search index, or of an incomplete purge of old data after a major site change such as migration or mirroring. This can manifest as missing or duplicated search results, or even results coming back from the wrong site. Search index corruption can also cause search crawlers to fail.
If a simple search reindex doesn't work, a full reindex may be in order. This article will walk you through the full reindex process, including manual deletion of old search data.
Environment
- DNN Platform or Evoq 7+
To fix this, you'll need:
- Access to a Superuser account.
- Access to the SQL server instance for your site
Solution
To completely re-index the Search function for ALL DNN portals, please follow the steps below:
- Create a backup of your database and add all website files to a .zip archive.
- Delete the content of the Search folder from
[SiteRootDirectory]/App_Data/Search
.
Note: If you are unable to delete the content due to a file lock, recycle the application pool to release the file lock. - From the Persona Bar, navigate to Settings > Scheduler > Scheduler.
- Click on the pencil icon next to the Search: Site Crawler task and disable the Enable Schedule option. Click Update.
- Perform the same action for the URL Crawler and File Crawler tasks.
- Open the SQL console:
- DNN 7/8: Navigate to Host > Advanced Settings > SQL.
- DNN 9: Navigate to Settings > SQL Console.
- After confirming you made a database backup in Step 1. above, execute the following query:
-- start reindex for all portals, file crawler
DELETE SH FROM ScheduleHistory SH
INNER JOIN Schedule S
ON SH.ScheduleID = S.ScheduleID
WHERE S.TypeFullName = 'DotNetNuke.Professional.SearchCrawler.FileCrawler.FileCrawler, DotNetNuke.Professional.SearchCrawler'
OR S.TypeFullName = 'DotNetNuke.Professional.SearchCrawler.FileCrawler.FileCrawler,DotNetNuke.Professional.SearchCrawler' - From the Persona Bar, navigate to Settings > Scheduler > Scheduler.
- Click on the pencil icon next to the Search: Site Crawler task and turn on the Enable Schedule option. Click Update.
- Turn on the Enable Schedule option for the File Crawler and URL Crawler tasks.
- From the Persona Bar, navigate to Settings > Site Settings > Search > Basic Settings.
- Click on the Re-index Content and Re-index Host Content buttons.
- Navigate to Settings > Scheduler > Scheduler to confirm that the tasks are going to be executed. Otherwise, go to the settings of each Crawler task and click Run Now.
- Clear cache:
- DNN 7/8: Tools > Clear Cache.
- DNN 9: Settings > Servers > Clear Cache.
Testing
To confirm that the reindex has been successful by:
- Once the tasks are complete, navigate to Settings > Scheduler > History to check if there are any errors.
- Enter a page name in the Search Results to see if it returns any results.
Comments
0 comments
Please sign in to leave a comment.