beautypg.com

Google Search Appliance Protocol Reference User Manual

Page 100

background image

Google Search Appliance: Search Protocol Reference

Query Suggestion Service /suggest Protocol

100

Request:

/suggest?q=&max=&site=&client=&format=rich

Response (wrapped for readability):

{

"query": "",
"results": [
{ "name": "", "type": "suggest"},
{ "name": "", "type": "suggest"},
{ "name": "", "type": "uar", "content": "Title of UAR",

"moreDetailsUrl": "URL of UAR"}

...,
]

}

Clients can distinguish between suggest and user-added results by looking at the type. The type can be
suggest or uar (user-added result) to identify the type of suggestion.

The style value is reserved and not used in version 6.2. For suggest entries, a term must be present.
For user-added results entries, moreDetailsUrl must be present.

If no result occurs, the rich format provides the following response:

{ "query": , "results": [] }

q

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

site

Collection name.

default_collection

Parameter

Description

Default Value