Crawl schedule, Crawler access rules – Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 12

Advertising
background image

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

12

Crawl Schedule

Retrieve and update the crawl schedule for a search appliance.

Retrieving the Crawl Schedule

Retrieve the crawl mode and get the crawl schedule as follows:

GsaEntry myEntry = myClient.getEntry("config", "crawlSchedule");
System.out.println("Is Scheduled Crawl: " +

myEntry.getGsaContent("isScheduledCrawl"));

System.out.println("Crawl Schedule: " + myEntry.getGsaContent("crawlSchedule"));

Updating the Crawl Schedule

Update the crawl schedule or crawl mode as follows:

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

// Add a property to updateEntry
updateEntry.addGsaContent("isScheduledCrawl", "1");
updateEntry.addGsaContent("crawlSchedule", "0,0300,360\n2,0000,1200");

// Send the request
myClient.updateEntry("config", "crawlSchedule", updateEntry);

Crawler Access Rules

Create, retrieve, update, and delete crawler access rules for a search appliance.

Property

Description

crawlSchedule

The crawl schedule is only available in scheduled crawl mode. The value of
crawlSchedule has the format:

Day,Time,Duration

Where:

•

Day is a number representing the days of a week: 0 means Sunday and
1 means Monday.

•

Time is a 24-hour representation of time. The time pertains to the
search appliance and not the computer running the application to set
the value.

•

Duration is the representation for the time period in minutes. The
duration cannot be greater than 1440, which means 24 hours. A
scheduled crawl begins on the values in Day and Time and continues
for the Duration.

isScheduledCrawl

Set to 1 if the search appliance is in scheduled crawl mode or set to 0 if the
search appliance is in continuous crawl mode.

Advertising