2

Is there a way to fully cancel a search crawl via Powershell or Central Administration? I have a current crawl going and it is sitting at 1209:04:57 for the duration. It has been in the Stopping status for over 2 hours.

1
  • Did you resolve the issue @kevorski?
    – Frank H
    Commented Jul 15, 2017 at 20:29

4 Answers 4

4

Stop the crawl for all content sources

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object { 
If($_.CrawlStatus -ne "Idle")
{
    Write-Host "Stopping crawl on Content source $($_.Name)..." 
    $_.StopCrawl() 

    While ($_.CrawlStatus -ne "Idle")
 {
        Write-Host "Waiting to crawl to be stopped..." -f DarkYellow
        sleep 3
    }
    write-host "Crawl Stopped Successfully!" -f DarkGreen
}
else
{
    write-host "Crawl Status of the Content source '$($_.Name)' is Idle!" -f DarkGreen
}
}
3

Try restarting the search service.

  • go to services

  • restart "SharePoint Server Search 14" service

If you got multiple servers with search service you need to do this on each server.

1

try this code

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object { If($_.CrawlStatus -ne "Idle") { Write-Host "Stopping crawl on Content source $($_.Name)..." $_.StopCrawl() While ($_.CrawlStatus -ne "Idle") { Write-Host "Waiting to crawl to be stopped..." -f DarkYellow sleep 3 } write-host "Crawl Stopped Successfully!" -f DarkGreen } else { write-host "Crawl Status of the Content source '$($_.Name)' is Idle!" -f DarkGreen } }

Read more: http://www.sharepointdiary.com/2015/05/force-stop-sharepoint-search-crawl-using-powershell.html#ixzz4mkAV4BnY

if this is not working try this

net stop OSearch14
net start OSearch14
7
  • I used this script, but it is still sitting at stopping
    – kevorski
    Commented Jul 13, 2017 at 20:08
  • check the edit answer
    – Waqas Sarwar MVP
    Commented Jul 13, 2017 at 20:23
  • When I attempt to start the service it tells me the requested service has already been started
    – kevorski
    Commented Jul 13, 2017 at 20:29
  • thats fine, but what is the status of the crawl?
    – Waqas Sarwar MVP
    Commented Jul 13, 2017 at 20:29
  • It is still crawling
    – kevorski
    Commented Jul 13, 2017 at 20:33
0

I ended up deleting the Search Application and created a new one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.