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

  • 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 9
Google Search Appliance: Administrative API Developer’s Guide: .NET 10
Retrieving Data Source Feed Information
Retrieve all data source feed information from a search appliance using the
feed
feed:
// Send a request and print the response
Dictionary<string, string> queries = new Dictionary<string, string>();
queries.Add("query",feedDataSource);
GsaFeed myFeed = myService.QueryFeed("feed", queries);
foreach(GsaEntry myEntry in myFeed.Entries) {
//get information on each myEntry
Console.WriteLine("Feed Name: " + myEntry.GetGsaContent("entryID"));
Console.WriteLine("Feed Data Source: " + myEntry.GetGsaContent
("feedDataSource"));
Console.WriteLine("Feed Type: " + myEntry.GetGsaContent("feedType"));
Console.WriteLine("Feed State: " + myEntry.GetGsaContent("feedState"));
Console.WriteLine("Feed Time: " + myEntry.GetGsaContent("feedTime"));
Console.WriteLine("Error Records: " + myEntry.GetGsaContent("errorRecords"));
Console.WriteLine("Success Records: " + myEntry.GetGsaContent
("successRecords"));
Console.WriteLine("Log Content: " + myEntry.GetGsaContent("logContent"));
}
You can get the individual feed information from a search appliance as follows:
GsaEntry myEntry = myService.GetEntry("feed", FEED_NAME);
Console.WriteLine("Feed Data Source: " + myEntry.GetGsaContent
("feedDataSource"));
Console.WriteLine("Feed Type: " + myEntry.GetGsaContent("feedType"));
Console.WriteLine("Feed State: " + myEntry.GetGsaContent("feedState"));
Console.WriteLine("Feed Time: " + myEntry.GetGsaContent("feedTime"));
Console.WriteLine("Error Records: " + myEntry.GetGsaContent("errorRecords"));
Console.WriteLine("Success Records: " + myEntry.GetGsaContent("successRecords"));
Console.WriteLine("Log Content: " + myEntry.GetGsaContent("logContent"));
Note: A feed log of all data source feeds can be retrieved only by getting individual feeds.
Deleting Data Source Feeds
Delete a data source feed to remove all documents for a feed from the index on the search appliance. In
the Admin Console, deleted feed sources are marked with
Delete
.
Delete data source feeds as follows:
// Create an entry to hold properties to update
GsaEntry updateEntry = new GsaEntry();
// Add a property to updateEntry
updateEntry.AddGsaContent("updateMethod", "delete");
myService.UpdateEntry("feed", FEED_NAME, updateEntry);
Note: Delete data source feeds only of the type
FULL_FEED
or
incremental
. After deleting a data source
feed, the deleted feed still exists, and the feed type changes to
DELETED
.
Zobrazit stránku 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 54 55

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

Žádné komentáře