If you’ve ever had fun with SharePoint Search, most likely you’ve seen (or even used) Index Reset there. This is very useful if you want to clear everything from your SharePoint index – but sometimes it’s not good enough:
- If you don’t want to clean the full index but one Content Source only.
- If you have FAST Search for SharePoint 2010.
- Both 🙂
1. Cleaning up one Content Source only
Sometimes you have too much content crawled, but need to clear one Content Source. In this case, clearing everything might be very painful – imagine to clear millions of documents, then crawling everything that should not have been cleaned…
Instead, why not cleaning one Content Source only?
It’s much easier than it seems to be:
- Open your existing Content Source.
- Check if there’s no crawl running on this Content Source. The status of the Content Source has to be Idle. If not, Stop the current crawl and wait until it gets done.
- Remove all Start Addresses from your Content Source (don’t forget to note them before clearing!).
- Wait until the index gets cleaned up.(*)
- Add back the Start Addresses (URLs) to your Content Source, and Save your settings..
- Enjoy!
With this, you’ll be able to clear only one Content Source.
Of course, you can use either the UI of SSA in Central Administration or PowerShell, the logic is the same. Here is a simple PowerShell script for removing the Start Addresses:
$contentSSA = “FAST Content SSA” $sourceName = “MyContentSource”
$source = Get-SPEnterpriseSearchCrawlContentSource -Identity $sourceName -SearchApplication $contentSSA $URLs = $source.StartAddresses | ForEach-Object { $_.OriginalString }
$source.StartAddresses.Clear()
Then, as soon as you’re sure the Index has been cleaned up(*), you can add back the Start Addresses, by this command:
ForEach ($address in $URLs){ $source.StartAddresses.Add($address) }
You most likely know Index Reset on the Search Service Application UI:

Well, in case of you’re using FAST Search for SharePoint 2010 (FS4SP), it’s not enough. Steps for making a real Index Reset are the followings:
- Make an Index Reset on the SSA, see the screenshot above.
- Open FS4SP PowerShell Management on the FAST Server, as a FAST Admin.
- Run the following command: Clear-FASTSearchContentCollection –Name <yourContentCollection>. The full list of available parameters can be found here. This deletes all items from the content collection, without removing the collection itself.
Steps are the same as in case of SharePoint Search, see above.
4. Checking the status of your Index
In the Step #4 for above (*), I’ve mentioned you should wait until the index gets cleaned up, and it always takes time.
First place where you can go is the the SSA, there is a number that is a very good indicator:

In case of FS4SP, you should use PowerShell again, after running the Clear-FASTSearchContentCollection command:
- Open FS4SP PowerShell Management on the FAST Server, as a FAST Admin.
-
Run the following command: Get-FASTSearchContentCollection –Name <yourContentCollection>. The result is containing several information, including DocumentCount:
How to check the clean-up process with this?
First option: if you know how many items should be cleaned, just check the DocumentCount before you clean the Content Source, and regularly afterwards. If the value of DocumentCount is around the value you’re expecting AND not decreasing anymore, you’re done.
Second option: if you don’t know how many items will be cleared, just check the value of DocumentCount regularly, like in every five minutes. If this value stopped decreasing AND doesn’t get decreased for a while (eg. for three times you’re checking), you’re done.
As soon as you’re done, you can add back the Start Addresses to your Content Source, as mentioned above.
What happens to the site using search web parts at the home page when resetting index for the same content source page is depending on ?
Does it wipe out the index and rebuild , which can cause we parts to loose data, or does it overwrite existing index , which will not take the web parts down but will take longer to show the new items.
Hi Umar, It’s a “fresh start” which means the index is cleaned, then rebuilt again.