Partager via


CrawlHistory.GetCrawlHistory, méthode () (Microsoft.Office.Server.Search.Administration)

Retrieves all crawl history records for the last 7-day period.

Espace de noms : Microsoft.Office.Server.Search.Administration
Assembly : Microsoft.Office.Server.Search (dans microsoft.office.server.search.dll)

Syntaxe

'Déclaration
Public Function GetCrawlHistory As DataTable
'Utilisation
Dim instance As CrawlHistory
Dim returnValue As DataTable

returnValue = instance.GetCrawlHistory
public DataTable GetCrawlHistory ()

Valeur de retour

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.

Exemple

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();

Voir aussi

Référence

CrawlHistory, classe
Membres CrawlHistory
Microsoft.Office.Server.Search.Administration, espace de noms