beautypg.com

Query suggestion service /suggest protocol, Chapter 5 – Google Search Appliance Protocol Reference User Manual

Page 93

background image

Google Search Appliance: Search Protocol Reference

93

Chapter 5

Query Suggestion Service /suggest
Protocol

Chapter 5

The query suggestion service provides suggestions that complete a user’s search query. As a user enters
a query in the search box, a drop-down menu appears with suggestions to complete the query. The
search appliance uses the most popular search queries of its users to determine the top suggestions
that list for a query.

Only queries that returned results are used to build the database of query suggestions. Queries with
special terms, such as inmeta:, info:, link:, daterange:, etc are excluded when building the
database of query suggestions.

In addition, if activated, the search appliance adds user-added results to the list of suggestions.

For information on retrieving and updating the suggestion blacklist using Java and the Google Data API,
see “Query Suggestion Blacklist” in the Administrative API Developer’s Guide: Java. For information on
user-added results, see “Providing User Results” in Creating the Search Experience.

The following example shows query suggestions:

You can use the query suggestion feature to:

Capture JSON response output from query suggestions and filter the information, before displaying
suggestions to the user.

Upload (and retrieve) a blacklist of bad words using the Google Data API, so that these words do not
appear in the list of suggestions.

Add information to a custom interface for search implementations that consume search results in
XML form.

Enable the query suggestion client for a front end from Search > Search Features > Front Ends >
Output Format > Search Box > Query suggestions.

The query suggestion service adds latest query data to its list of suggestions once every 24 hours.
However you can force the service to pick up changes immediately by disabling and enabling the Query
Suggestions checkbox. When you enable the checkbox, the suggest service is sent a HUP signal so that it
updates its data structure from the latest query logs.