Pause or resume crawl – Google Search Appliance Administrative API Developers Guide: Java User Manual
Page 20

Google Search Appliance: Administrative API Developer’s Guide: Java
20
Retrieve an individual OneBox module’s log information from a search appliance as follows:
// Send the request and print the response
GsaEntry myEntry = myClient.getEntry("onebox",ONEBOX_NAME);
System.out.println("OneBox Log: " + myEntry.getGsaContent("logContent"));
Note: You can only retrieve OneBox log entries individually.
Deleting a OneBox Module
Delete a OneBox module from a search appliance as follows:
myClient.deleteEntry("onebox", ONEBOX_NAME);
Pause or Resume Crawl
Check crawl status, pause the crawl, or resume the crawl.
Retrieving Crawl Status
Retrieve the status of crawl as follows:
// Send the request and print the response
GsaEntry myEntry = myClient.getEntry("command", "pauseCrawl");
System.out.println("Pause Crawl: " + myEntry.getGsaContent("pauseCrawl"));
Pausing or Resuming Crawl
Pause or resume a crawl as follows:
// Create an entry to hold properties to update
GsaEntry updateEntry = new GsaEntry();
// Add properties to updateEntry
updateEntry.addGsaContent("pauseCrawl", "0");
updateEntry.addGsaContent("doNotCrawlURLs", "http://frequent/");
// Send the request
myClient.updateEntry("command", "pauseCrawl", updateEntry);
Property
Description
pauseCrawl
Indicates: 1 if crawl is paused, 0 if crawling is occurring.