In some cases stopping a crawl does not work through sharepoint central administration or through the Ektron workarea. Here are the steps to force stop it through powershell.
- Login to the search server with your search service user. This user can be identified by looking at the log on as property of the Sharepoint Server Search 14 service.
- Create a file with a .ps1 extension. For this example we are calling it crawlstop.ps1.
- Add the following text to the file.
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object {
if ($_.CrawlStatus -ne "Idle")
{
Write-Host "Stopping currently running crawl for content source $($_.Name)..."
$_.StopCrawl()
do { Start-Sleep -Seconds 1 }
while ($_.CrawlStatus -ne "Idle")
}
} - Run SharePoint 2010 Management Shell as an admin user.
- Give the path of the file to run the script and stop the crawl.
e.g. c:\crawlstop\crawlstop.ps1
Other Resources
Script adapted from http://get-spscripts.com/2012/05/force-stop-and-then-start-full-crawl-on.html
Please sign in to leave a comment.