Google Search Appliance Administrative API Developers Gui Manuel d'utilisateur Page 46

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 56
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 45
Google Search Appliance: Administrative API Developer’s Guide: Java 46
A list of search log entries will be returned.
GsaFeed myFeed = myClient.getFeed("searchLog");
for(GsaEntry entry : myFeed.getEntries()) {
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"));
}
Creating a Search Log
Create a new search log entry by sending an authenticated POST request to the
root
entry of the
searchLog
feed.
A new search log entry will be generated and returned.
GsaEntry insertEntry = new GsaEntry();
insertEntry.addGsaContent("reportName", "bbb");
insertEntry.addGsaContent("collectionName", "default_collection");
insertEntry.addGsaContent("reportDate", "date_3_25_2009");
myClient.insertEntry("searchLog", insertEntry);
Retrieving a Search Log
Check the search log status and get search log content by sending an authenticated
GET
request to the
search log entry of the
searchLog
feed using the following query parameters.
Parameter Description
query
Query string for the
logContent
. The
logContent
contains many lines of logs.
The query string applies to each line, and only lines that contain the query string
are returned.
maxLines
The maximum
logContent
lines to retrieve. The default value is 50 lines.
startLine
The first
logContent
lines to retrieve. The default value is 1 line.
Vue de la page 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 55 56

Commentaires sur ces manuels

Pas de commentaire