How to crawl item in warning log? RRS feed

  • Question

  • Hi,

    I just wonder that is it possible to crawl all items in warning log.

    My situation is.... there are around 100,000 documents. And I start the crawl.

    It succeed around 80,000 and 20,000 are in warning log.

    I fix that problem state in warning log and want to do incremental crawl for those warning items only. Is there a way to do this? I don't want to start full crawl again because it took time.


    Thanks for suggestion

    Monday, October 10, 2011 4:18 AM

All replies

  • Any suggestion please?


    Wednesday, October 12, 2011 8:37 AM
  • Hi Andy,

    Researched this a bit and these are my findings. As you know you can go to the crawl log on the content sources and manually choose "Recrawl this item in the next crawl" from any one crawl entry.

    My approach was to investigate what this does. When you click that entry a postback is made with values similar to:


    where dbname=DOMAIN\SearchCrawlDB1

    and itemid=1020

    This ends up calling

    ReCrawlUrl(itemid, dbName, 0x80040dc6) (Microsoft.Office.Server.Search.Internal.UI.LogViewer)

    which retrieves the loglevel from the value 0x80040dc6 (via a SQL command) and then continues to call

    RecrawlUrl(dbname, itemid, errorId, errorLevel) (Microsoft.Office.Server.Search.Administration.CrawlLogData)

    which executes a SQL storec proc named "dbo.proc_MSS_SetRecrawl".


    Of course, CrawlLogData is an internal class which is not accessible in code, and I have found no other API which calls that stored procedure.

    So your options are either to use reflection and invoke this method for each item you want to recrawl, or break support and execute the stored procedure directly for each item. Once this is done you can start an incremental crawl, and your items will be reprocessed without having to do a full crawl.

    Mikael Svenson 


    Search Enthusiast - SharePoint MVP/WCF4/ASP.Net4
    Saturday, October 15, 2011 8:03 PM