beautypg.com

Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 26

background image

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

26

Directory status entry properties:

Document status entry properties:

Example:

Map queries = new HashMap();
queries.put("uriAt","http://server.com/secured/test1/");
GsaFeed myFeed = myClient.queryFeed("diagnostics", queries);

for(GsaEntry entry : myFeed.getEntries()) {

System.out.println(entry.getGsaContent("entryID"));
if (entry.getGsaContent("entryID").equals("description")) {

System.out.println("Number of Pages: " + entry.getGsaContent("numPages"));
System.out.println("URI At: " + entry.getGsaContent("uriAt"));

} else if (entry.getGsaContent("type").equals("DirectoryContentData" )||

entry.getGsaContent("type") .equals("HostContentData")) {
System.out.println("Type: " + entry.getGsaContent("type"));
System.out.println("Number of Crawled URLs: " +

entry.getGsaContent("numCrawledURLs"));

System.out.println("Number of Retrieval Errors: " +

entry.getGsaContent("numRetrievalErrors"));

System.out.println("Number of Excluded URLs: " +

entry.getGsaContent("numExcludedURLs"));

} else if (entry.getGsaContent("type").equals("FileContentData")) {

System.out.println("Type: " + entry.getGsaContent("type"));
System.out.println("Time Stamp: " + entry.getGsaContent("timeStamp"));
System.out.println("Document State: " + entry.getGsaContent("docState"));
System.out.println("Is Cookie Server Error: " +

entry.getGsaContent("isCookieServerError"));

}

}

Property

Description

Entry Name

The URL of the directory.

numCrawledURLs

The number of crawled documents in this directory,

numExcludedURLs

The number of excluded URLs in this directory.

numRetrievalErrors

The number of retrieval error documents in this directory.

type

DirectoryContentData or HostContentData.

Property

Description

Entry Name

The URL of the document.

docState

The status of this document. See “Document Status Values” on page 23 for
possible docState values.

isCookieServerError

Indicates if a cookie server error occurred.

timeStamp

The last time the search appliance processed this document.

type

FileContentData