Google Search Appliance Administrative API Developers Gui Bedienungsanleitung Seite 35

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 56
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 34
Google Search Appliance: Administrative API Developer’s Guide: Java 35
Use the following properties to set KeyMatch configurations.
Note: The format for a KeyMatch configuration rule is as follows:
Search_Terms,KeyMatch_Type,URL,Title
KeyMatch_Type
can be:
KeywordMatch
,
PhraseMatch
, or
ExactMatch
.
Search_Term
and
URL
fields cannot be empty. The KeyMatch configuration conforms to the CSV format,
which uses commas to separate values.
Retrieving KeyMatch Settings
Retrieve KeyMatch settings as follows:
Map<String, String> queryMap = new HashMap<String, String>();
// Initialize the query
queryMap.put("query", "myQuery");
queryMap.put("startLine", "0");
queryMap.put("maxLines", "50");
// Send the request and print the response
GsaEntry myEntry = myClient.getEntry("keymatch", "myFrontend");
for (Map.Entry<String, String> me : myEntry.getAllGsaContents().entrySet()) {
if (me.getKey().matches("\\d+")) {
System.out.println("The lines for " + me.getKey() + " are: " +
me.getValue());
}
}
System.out.println("The number of lines are: " +
myEntry.getGsaContent("numLines"));
Property Description
line_number
The
line_number
of the KeyMatch configuration rule.
newLines
The new KeyMatch configuration to update. This value may include multiple
KeyMatch statements. The line delimiter is
\n
.
numLines
The number of total result lines.
originalLines
The original KeyMatch configurations to change. The value may include multiple
KeyMatch statements. The line delimiter is
\n
.
startLine
The starting line number of a KeyMatch configuration to change. The minimum
value is 0.
updateMethod
The method to change a KeyMatch configuration.
Possible values are:
update
. Updates part of the KeyMatch configuration table to the new
configurations. Delete KeyMatch configurations using the
update
method.
See the example that follows.
append
. Adds a new KeyMatch configuration to the end of the KeyMatch
configuration table.
replace
. Deletes all rules in the KeyMatch configuration table and then
appends the new rules that you provide.
Seitenansicht 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 55 56

Kommentare zu diesen Handbüchern

Keine Kommentare