beautypg.com

Search, Retrieving status of a reset index, Resetting the index – Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 30

background image

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

30

WARNING:

Resetting an index deletes all the documents in the index. Depending on the number of

documents to crawl, crawling an index can take many days to complete.

Retrieving Status of a Reset Index

Retrieve the status of a reset index as follows:

// Send the request and print the response
GsaEntry myEntry = myClient.getEntry("command", "resetIndex");
System.out.println("Reset Index: " + myEntry.getGsaContent("resetIndex"));
System.out.println("Reset Status Code: " +

myEntry.getGsaContent("resetStatusCode"));

System.out.println("Reset Status Message: " +

myEntry.getGsaContent("resetStatusMessage"));

Resetting the Index

Reset the index as follows:

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

// Add a property to updateEntry
updateEntry.addGsaContent("resetIndex", "1");
myClient.updateEntry("command", "resetIndex", updateEntry);

Search

The sections that follow describe how to configure the Search features of the Admin Console:

“Front Ends: Remove URLs and a Relative OneBox” on page 31

“Output Format XSLT Stylesheet” on page 32

“KeyMatch Settings” on page 34

“Related Queries” on page 37

“Query Suggestion” on page 40

“Search Status” on page 41

Property

Description

resetIndex

1 if index is reset, 0 if index is not reset.

resetStatusCode

Status code for resetting index.

resetStatusMessage

Status message: ERROR, PROGRESS, READY.