beautypg.com

Related queries – Google Search Appliance Administrative API Developers Guide: Java User Manual

Page 37

background image

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

37

The following example replaces KeyMatch settings:

// Create an entry to hold properties to replace
GsaEntry replaceEntry = new GsaEntry();
replaceEntry.setId("myFrontend");
replaceEntry.addGsaContent("updateMethod", "replace");

// Prepare new content
String newLines =

"image,KeywordMatch,http://images.google.com/,Google Image Search\n" +
"video,KeywordMatch,http://www.youtube.com/,Youtube\n" +
"rss feed,PhraseMatch,http://www.google.com/reader,Reader";

replaceEntry.addGsaContent("newLines", newLines);

// Send the request to the search appliance
myClient.updateEntry("keymatch", "myFrontend", replaceEntry);

Related Queries

Use related queries to associate alternative words or phrases with specified search terms. Related
queries are also known as synonyms. Use the following parameters to search for a query and access
lines from a starting line number and for a maximum amount of lines.

Parameter

Description

query

A query string to perform a full-text search.

startLine

The starting line number of the result, the default value is to start at line 0.

maxLines

The number of result lines in the response, the default value is 50 lines.