Recently our client needed to remove items from a specific content source.
The problem was that neither the standard SharePoint Search nor FS4SP had any support for this scenario (UI or any object API) even though it seems like a reasonable task.
The only thing the product offers us is Index Reset which clears all the searchable items in your index, and in case of FS4SP we will need to call Clear-FASTSearchContentCollection using PowerShell.
Of course it’s a good method for clearing all content but in our case we needed to clear only one content source .
Luckily for us Mikael Svenson Found the answer, in his post he explained how we can achieve this using PowerShell script. at the end of the post he suggested turning the script into a .ps1 file or a cmdlet.
Well, I decided to do something better and turn it in to a tool .
All you need is to download my ContentSourceCleaner tool and run it on a SharePoint server.
1. In the first combo box choose the appropriate Search Service Application and
2. In the second combo box choose the content source.
hit the ‘Clear!’ button and if the operation succeeded you will get a green check that triggers a delete mechanism which will remove all items from a specific content source .
Shortly the process will start (in my opinion there is probably some timer job that is being started)
There are couple of ways to check the process of removing items:
1. In crawl history you will see deleted items.
2. In most of the times you will see current crawl duration time even though the status is in idle, it indicates the time it takes to remove the content source’s items.
3. Check the result item count ( it should decrease).
Download content source cleaner.
See u next time.