Query suggestion, Changing related queries – Google Search Appliance Administrative API Developers Guide: .NET User Manual
Page 39

Google Search Appliance: Administrative API Developer’s Guide: .NET
39
Changing Related Queries
The following example appends related queries:
// Create an entry to hold properties to append
GsaEntry appendEntry = new GsaEntry();
appendEntry.AddGsaContent("updateMethod", "append");
// Prepare new content
string newLines = "airplane,aircraft\n" + "google,googol\n" + "stock,security";
appendEntry.AddGsaContent("newLines", newLines);
// Send the request to the search appliance
myService.UpdateEntry("synonym", "myFrontend", appendEntry);
The following example updates related queries:
// Create an entry to hold properties to update
GsaEntry updateEntry = new GsaEntry();
updateEntry.AddGsaContent("updateMethod", "update");
// Set the starting line number
updateEntry.AddGsaContent("startLine", 0);
// Provide the original content
string originalLines = "airplane,aircraft\ngoogle,googol";
updateEntry.AddGsaContent("originalLines", originalLines);
// Prepare new content
string newLines = "airplane,helicopter\n,";
updateEntry.AddGsaContent("newLines", newLines);
// Send the request to the search appliance
myService.UpdateEntry("synonym", "myFrontend", updateEntry);
Note: Delete a setting by changing the statement to a comma (,) value.
The following example replaces related queries:
// Create an entry to hold properties to replace
GsaEntry replaceEntry = new GsaEntry();
replaceEntry.AddGsaContent("updateMethod", "replace");
// Prepare new content
string newLines = "airplane,aircraft\n" + "google,googol\n" + "stock,security";
replaceEntry.AddGsaContent("newLines", newLines);
// Send the request to the search appliance
myService.UpdateEntry("synonym", "myFrontend", replaceEntry);
Query Suggestion
There are two features for working with query suggestions:
•
“Query Suggestion Blacklist” on page 40
•