Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves all crawl history records for the last 7-day period.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Function GetCrawlHistory As DataTable
'Usage
Dim instance As CrawlHistory
Dim returnValue As DataTable
returnValue = instance.GetCrawlHistory()
public DataTable GetCrawlHistory()
Return Value
Type: System.Data.DataTable
A [DataTableT:System.Data.DataTable] object with a column that represents the following columns in the database, sorted in chronological order: CrawlID, ContentSourceID, ProjectID, CrawlType, RequestTime, Status, StartTime, EndTime, SuccessCount, ErrorCount, WarningCount.
Examples
This code retrieves the crawl history into a [DataTableT:System.Data.DataTable] object.
SearchContext context;
string strURL = <SSP url>;
using (SPSite site = new SPSite(strURL))
{
context = SearchContext.GetContext(site);
}
CrawlHistory history = new CrawlHistory(context);
DataTable table = new DataTable();
table = history.GetCrawlHistory();