SharePoint Search crawling got stuck at stopping or crawlling!!
Powershell script to set crawl status as idle
You may face issue sometimes in crawl component configuration of SharePoint 2010 Search. If you change any configuration of the crawl, you must run full crawl once, or else it will throw an error in backup operation. If a crawler is in running state, it will not allow you to change scope or sites URL.
To set the crawl status of a search service, write search service name in below script:
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")
}
}
The above script will check the crawl status if its not idle status, it stop the crawl for a second and start again