Query suggestion requests and responses, Legacy format – Google Search Appliance Protocol Reference User Manual
Page 97

Google Search Appliance: Search Protocol Reference
Query Suggestion Service /suggest Protocol
97
Query Suggestion Requests and Responses
The output format controls the query suggestion request and response:
•
Legacy Format—Backward compatibility with version 6.0 (see “Legacy Format” on page 97)
•
OpenSearch Format—Supports the OpenSearch protocol (see “OpenSearch Format” on page 98)
•
Rich Output Format—Version 6.2 and later default format (see “Rich Output Format” on page 99)
Legacy Format
The legacy format is similar to the suggest feature in the version 6.0 search appliance. The token and
max_matches were in version 6.0, and the client, format, and site parameters were introduced in
version 6.2.
Request:
/suggest?token=
Parameter
Description
Default Value
callback
Provides a JSONP compatible response from suggest. If
you set callback=test, it will return:
/* GSA Suggest Service JSONP Response. */
test(
The prefix
/* GSA Suggest Service JSONP Response. */
is
hard-coded in the response to safeguard against cross-
site scripting attacks on the JSONP callback name. You
must remove the prefix before the response can be
parsed by JavaScript.
client
Front end name.
default_frontend
format
The output format in which the client wants the results.
legacy
max_matches
The maximum number of results that the suggest server
should return. The minimum is 0, which indicates that the
server should return an empty set, however this result
would not be meaningful.
The maximum is not defined. If this parameter is not set,
then the default value is 10 possible matches. If fewer
suggestions are configured, then they are returned.
10
site
Collection name.
default_collection
token
The partial query string that a user enters in the search
box. The minimum size is one character. If set to 0, that is,
if the search box is empty, then the suggest client side
JavaScript doesn’t send a request to query suggestion.
Even if an administrator implements a custom interface,
sending an empty token returns an empty set as the
result. The maximum size of the token parameter is not
defined.
None