SharePoint Crawl log and the mysterious SearchID !
Hi Search Folks,
A very quick post to clarify the mysterious SearchID GUID seen when troubleshooting Crawl Errors.
Whenever an item crawl fails to crawl , the URL View page (CA / Search Service Application) will provide you with a error message but also with a SearchID GUID.
Well, mystery solved...The SearchID GUID is the actual Correlation Id you can extract to find out more details about the crawl error. You can then issue a simple PS command to extract the much needed ULS (note the lowercasing).
Merge-SPLogFile -Path "D:\temp\sitemastercrawlerror.log" -Correlation "3006F2D8-20F6-40F1-86A7-87FFC4C5238E".ToLowerInvariant()
As long as you have the ULS still available in your farm, you can start troubleshooting very quickly any crawl error.
One more thing...
For those you like to practice their PS abilities, you may consider automating the extraction of crawl errors out of the Crawl Log output. Remember that the Crawl Log object is available through SP Object Model (SP2013+) and allows you to retrieve all Crawl Log related data. You can then parse the ErrorDesc column to extract the SearchID and issue automatically Merge-SPLogFile.
Example of dumping Crawl Logs errors onto a CSV file (Adapt the SSA name, the Content Source and output file path)
$ssa = Get-SPEnterpriseSearchServiceApplication | Where-Object {$_.Name -eq "Search Service Application"}
$id = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa | ? { $_.Name -eq "Intranet"}
$log = New-Object Microsoft.Office.Server.Search.Administration.CrawlLog $ssa
$dt = $log.GetCrawledUrls($false, 1000000, $null, $false, $id.Id, 2, -1, [System.DateTime]::MinValue, [System.DateTime]::MaxValue)
$dt | Export-CSV –Path “Crawllogs.csv” -NoTypeInformation
That's it. I hope this could helps you in your SharePoint Search journey.
Keep your Search up !