Ramblings of a SharePoint guy

See what happened was.....

SharePoint 2013 - Export Index a la Crawl Log

SharePoint 2013 - Export Index a la Crawl Log

  • Comments 3
  • Likes

I ran into an issue where I was replacing a competitor's search service.  I needed to provide validation that SharePoint indexed the same data and used the crawl log to get a list of all the items in SharePoint.  Here's the code:

$ssa = Get-SPEnterpriseSearchServiceApplication

$cl = New-Object Microsoft.Office.Server.Search.Administration.CrawlLog $ssa

$cl.GetCrawledUrls($false,1000000,"",$false,-1,0,-1,[datetime]::minvalue,[datetime]::maxvalue) | export-csv -notype successes.csv  # This will likely be huge

$cl.GetCrawledUrls($false,1000000,"",$false,-1,1,-1,[datetime]::minvalue,[datetime]::maxvalue) | export-csv -notype warnings.csv

$cl.GetCrawledUrls($false,1000000,"",$false,-1,2,-1,[datetime]::minvalue,[datetime]::maxvalue) | export-csv -notype errors.csv

Then just a quick ETL to SQL for SP's index, a full outer join and done.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment