CrawlHistory.GetCrawlHistory 方法 () (Microsoft.Office.Server.Search.Administration)
Retrieves all crawl history records for the last 7-day period.
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search (在 microsoft.office.server.search.dll 中)
语法
声明
Public Function GetCrawlHistory As DataTable
用法
Dim instance As CrawlHistory
Dim returnValue As DataTable
returnValue = instance.GetCrawlHistory
public DataTable GetCrawlHistory ()
返回值
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.
示例
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();
另请参阅
参考
CrawlHistory 类
CrawlHistory 成员
Microsoft.Office.Server.Search.Administration 命名空间