Retrieving data source feed information, Deleting data source feeds – Google Search Appliance Administrative API Developers Guide: Java User Manual
Page 10
Google Search Appliance: Administrative API Developer’s Guide: Java
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
Map
queries.put("query",feedDataSource);
GsaFeed myFeed = myClient.queryFeed("feed", queries);
for(GsaEntry myEntry : myFeed.getEntries()) {
//get information on each myEntry
System.out.println("Feed Name: " + myEntry.getGsaContent("entryID"));
System.out.println("Feed Data Source: " +
myEntry.getGsaContent("feedDataSource"));
System.out.println("Feed Type: " + myEntry.getGsaContent("feedType"));
System.out.println("Feed State: " + myEntry.getGsaContent("feedState"));
System.out.println("Feed Time: " + myEntry.getGsaContent("feedTime"));
System.out.println("Error Records: " + myEntry.getGsaContent("errorRecords"));
System.out.println("Success Records: " +
myEntry.getGsaContent("successRecords"));
System.out.println("Log Content: " + myEntry.getGsaContent("logContent"));
}
You can get the individual feed information from a search appliance as follows:
GsaEntry myEntry = myClient.getEntry("feed", FEED_NAME);
System.out.println("Feed Data Source: " +
myEntry.getGsaContent("feedDataSource"));
System.out.println("Feed Type: " + myEntry.getGsaContent("feedType"));
System.out.println("Feed State: " + myEntry.getGsaContent("feedState"));
System.out.println("Feed Time: " + myEntry.getGsaContent("feedTime"));
System.out.println("Error Records: " + myEntry.getGsaContent("errorRecords"));
System.out.println("Success Records: " +
myEntry.getGsaContent("successRecords"));
System.out.println("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");
myClient.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.