Resetting Search Index in SharePoint
Resetting Search Index in SharePoint
2013:
Search is indeed a mission critical service application in SharePoint and it’s very important that it remains healthy so that you get the
results in the Search center whenever you execute a search query. However, it’s quite possible that you may notice some errors in the
“Crawl log” stating that the crawler is not able to crawl the contents in the content source and at times it might get even worse such
that you may notice all “failures” and no “success” in the crawl logs. In scenarios like that you might have to reset the search index
so that the content in the index gets flushed away after which you need to perform a full crawl so that search index component
receives the newly processed items from the content processing component and writes them to the search index. Of course, directly
resetting the index is not a fix for any search related issue, please ensure that you do all the necessary troubleshooting steps from your
end to identify and fix the issue and once you reach a point where nothing really helped, that’s when you should think about resetting
the search index.
REPORT THIS AD
As I already mentioned above, resetting the search index should be the final step of troubleshooting for any search related issue.
However, based on my experience this when we should reset the search index ….
1. Index is corrupted
2. One or all index component status is degraded
3. You crawl completed successfully but you are not getting the search results.
4. When you move the index location
5. When Index location run out of space.
6. In a scenario where we have Index partitions spread across multiple servers and the indexed document count is out of
sync. For example, we have 2 servers set as index partitions, server 1 has 150K indexed documents and server2 has 145k index
documents
7. If we make any changes to search topology such as removing the search components ,adding the components & activating a
different search topology
Alright, now let’s take a look at the steps to reset the search index …
Pre-requisites:
Please ensure that you take care of the below mentioned pre-requisites before resetting the search index .Failing to do so will cause
adverse effects and at worst case you may end up recreating the entire search service application.
1. Make sure the crawl status for each content source is “Idle”. If any crawl is running, wait for the crawl to complete or follow
the steps to “Stop the active crawls” below.
2. Make sure continuous crawl for content sources is disabled [if applicable].This step is only specific to SharePoint 2013 and
above.
3. Make sure the crawl rate is 0
4. Make sure background activity status is “None” on search administration page.
3. Click on the drop down and select “Disable Continuous Crawl” to disable it.
4. Click “Ok” when below warning message appears.
5. Follow the same steps to disable continuous crawl for other content sources. Finally, all the content sources would
show “Idle” status as shown in the image below.
Suspend Search Service Application:
This step is to ensure that there is no crawling activity in place while we perform the Index reset.
Note: If you don’t know the name of search service application, you can get it by running below command before executing the above
command.
After suspending the search application, search administration page will show the status as “Paused for: External request” as shown
in the image below.
Ensure Crawl Rate is 0:
Using UI [User Interface]: This method can be used when the indexed content in your farm is not much in size i.e. index size is not
huge and also when you don’t have large content sources.
Using PowerShell: UI method is not recommended for SharePoint farms with large search index. [i.e. huge count of
searchable/indexed documents]. Using the UI method in large farms for resetting the search index can result in time out error. In such
cases, we need to use PowerShell method to reset the index.
USING UI:
USING POWERSHELL:
1. Login to the SharePoint server using Administrator credentials.
2. Open “SharePoint management shell” with elevated permissions.
3. Run the below command to reset search index.
3. Enable “continuous crawl” for the content sources if it was enabled prior to index reset.