beautypg.com

Gsa unification, Updating a search log, Deleting a search log – Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 47

background image

Google Search Appliance: Administrative API Developer’s Guide: Java

47

A search log entry with logContent, if content is ready, is returned.

Map queries = new HashMap();
queries.put("query","User");
queries.put("startLine","1");
queries.put("maxLine","10");

GsaEntry entry = myClient.queryEntry("searchLog", "bbb@default_collection",

queries);

System.out.println("Entry Name: " + entry.getGsaContent("entryID"));
System.out.println("Report State: " + entry.getGsaContent("reportState"));
System.out.println("Report Creation Date: " +
entry.getGsaContent("reportCreationDate"));
System.out.println("Report Date: " + entry.getGsaContent("reportDate"));
System.out.println("Is Final: " + entry.getGsaContent("isFinal"));
status = entry.getGsaContent("reportState");
if (status.equals("2") || status.equals("3")) {

System.out.println("Log Content: " + entry.getGsaContent("logContent"));
System.out.println("To Line: " + entry.getGsaContent("toLine"));
System.out.println("From Line: " + entry.getGsaContent("fromLine"));
System.out.println("Total Lines: " + entry.getGsaContent("totalLines"));

}

Updating a Search Log

Update the search log status and get search log content by sending an authenticated PUT request to the
search log entry of the searchLog feed. No properties are required.

GsaEntry updateEntry = new GsaEntry();
myClient.updateEntry("searchLog","bbb@default_collection");

Deleting a Search Log

Update the search log status and get search log content by sending an authenticated DELETE request to
a search log entry of the searchLog feed.

The search log entry will be deleted.

myClient.deleteEntry("searchLog", "bbb@default_collection");

GSA Unification

The sections that follow describe how to configure the GSA Unification features for the Admin Console:

“Configuring a GSA Unification Network” on page 48

“Adding a GSA Unification Node” on page 49

“Retrieving a Node Configuration” on page 49

“Retrieving All Node Configurations” on page 49

“Updating a Node Configuration” on page 50

“Deleting a Node” on page 50