beautypg.com

Retrieving related queries – Google Search Appliance Administrative API Developers Guide: Protocol User Manual

Page 51

background image

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

51

Use related queries to associate alternative words or phrases with specified search terms.

Use the following properties:

A related queries configuration rule is in the following format:

Search_Terms,Related_Queries

The Search_Terms and the Related_Queries values cannot be empty. The related queries
configuration conforms to the CSV format, which uses a comma to separate values.

Retrieving Related Queries

To get related queries, send an authenticated GET request to the following URL (wrapped for
readability):

http://Search_Appliance:8000/feeds/synonym/
Front_End?query=Search_String&startLine=Start_Line&maxLines=Max_Lines

Parameter

Description

query

A query string to perform a full-text search. For example, if you specify
computer in the query parameter, then you can view all related query
settings that contain the word computer.

startLine

The starting line number of the results, the default value is 0 lines.

maxLines

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

Property

Description

line_number

The line_number of a related query configuration rule in the list of rules.

newLines

The new related query configuration to change. You can include multiple
lines of related query values. The line delimiter is \n.

numLines

The number of total result lines.

originalLines

The original related query configurations to change. You can include
multiple lines of related query values. The line delimiter is \n.

startLine

The starting line number of the related query configuration to change. The
minimum value is 0.

updateMethod

The method to change related query configurations. Possible values are:

update. Update part of the related query configuration table to the
new configurations. You can also delete related query configurations
using the update method example in “Updating Related Queries” on
page 52
.

append. Add a new related query configuration to the end of the
related query configuration table.

replace. Delete all rules in the related query configuration table and
then append a new rule that you provide.