Google Search Appliance Administrative API Developers Gui Uživatelský manuál Strana 30

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 55
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 29
Google Search Appliance: Administrative API Developer’s Guide: .NET 30
A list of content statistics entries are returned.
GsaFeed myFeed = myService.GetFeed("contentStatistics");
foreach(GsaEntry entry in myFeed.Entries) {
Console.WriteLine("Entry Name: " + entry.GetGsaContent("entryID"));
Console.WriteLine("Maximum Size: " + entry.GetGsaContent("maxSize"));
Console.WriteLine("Minimum Size: " + entry.GetGsaContent("minSize"));
Console.WriteLine("Total Size: " + entry.GetGsaContent("totalSize"));
Console.WriteLine("Average Size: " + entry.GetGsaContent("avgSize"));
Console.WriteLine("Number of Files: " + entry.GetGsaContent("numFiles"));
}
Retrieving Content Statistics For a Crawled File
Retrieve content statistics for a single crawled file by sending an authenticated
GET
request to a content
statistics entry of the
contentStatistics
feed.
The following content statistics for a crawled file are returned:
GsaEntry entry = myService.GetEntry("contentStatistics", "text/html");
Console.WriteLine("Maximum Size: " + entry.GetGsaContent("maxSize"));
Console.WriteLine("Minimum Size: " + entry.GetGsaContent("minSize"));
Console.WriteLine("Total Size: " + entry.GetGsaContent("totalSize"));
Console.WriteLine("Average Size: " + entry.GetGsaContent("avgSize"));
Console.WriteLine("Number of Files: " + entry.GetGsaContent("numFiles"));
Reset Index
Reset the index for a search appliance using the following properties.
WARNING: Resetting an index deletes all the documents in the index. Depending on the number of
documents to crawl, crawling an index can take many days to complete.
Retrieving Status of a Reset Index
Retrieve the status of a reset index as follows:
// Send the request and print the response
GsaEntry myEntry = myService.GetEntry("command", "resetIndex");
Console.WriteLine("Reset Index: " + myEntry.GetGsaContent("resetIndex"));
Console.WriteLine("Reset Status Code: " + myEntry.GetGsaContent
("resetStatusCode"));
Console.WriteLine("Reset Status Message: " + myEntry.GetGsaContent
("resetStatusMessage"));
Property Description
resetIndex
1 if index is reset, 0 if index is not reset.
resetStatusCode
Status code for resetting index.
resetStatusMessage
Status message:
ERROR
,
PROGRESS
,
READY
.
Zobrazit stránku 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 54 55

Komentáře k této Příručce

Žádné komentáře