beautypg.com

Index diagnostics – Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 23

background image

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

23

Retrieving a Collection

Retrieve the attributes of a single collection as follows:

// Send the request and print the response
GsaEntry myEntry = myClient.getEntry("collection", "default_collection");
System.out.println("Follow URLs: " + myEntry.getGsaContent("followURLs"));
System.out.println("Do Not Crawl URLs: " +

myEntry.getGsaContent("doNotCrawlURLs"));

Updating a Collection

Update the attributes of a collection as follows:

// Create an entry to hold properties to update
GsaEntry updateEntry = new GsaEntry();

// Add properties to updateEntry
updateEntry.addGsaContent("followURLs", "http://good/");
updateEntry.addGsaContent("doNotCrawlURLs", "http://frequent/");

// Send the request
myClient.updateEntry("collection", "default_collection", updateEntry);

Deleting a Collection

Delete a collection as follows:

myClient.deleteEntry("collection", "new_collection");

Index Diagnostics

List crawled documents and retrieve the status of documents in a search appliance using the
diagnostics feed.

Document Status Values

The following tables list the document status values.

Note: Use the all to indicate any status value.

Successful Crawl:

Success Value

Crawl Description

1

Crawled from remote server

2

Crawled from cache