While looking at crawl log error messages on a SharePoint 2010 portal, I noticed that on each incremental crawl, roughly 38,000 errors were being reported. About 99% of these errors were "The object was not found". My initial thought was "Well, O' mighty SharePoint, why aren't you removing these items from the index after deciding they no longer exist?". Interestingly enough, there are search policies that dictate when objects that generate "access denied" or "file not found" messages get removed from the index.
The default delete policy for access denied or file not found errors is 30 errors in 30 days. The ErrorDeleteCountAllowed property dictates the maximum error count. The ErrorDeleteIntervalAllowed property dictates the timeframe, based in hours. BOTH conditions must be met, otherwise the item is retried on the next crawl.
To view the configured values for these properties:
$sa=Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application Name" $sa.GetProperty("ErrorDeleteCountAllowed") $sa.GetProperty("ErrorDeleteIntervalAllowed")
$sa=GetSPEnterpriseSearchServiceApplication -Identity "Search Service Application Name" $sa.SetProperty("ErrorDeleteCountAllowed", NewValue) $sa.SetProperty("ErrorDeleteIntervalAllowed", NewValue) $sa.Update()