Google Search Appliance

Office of Information Technology

Searching your front end and collection

You will probably want to include a small search form on your Web site, which will search against your front end when submitted. The alternative is to point your Web visitors directly to your front end on the Search Appliance when they want to search your site.

In the HTML code examples below, the variables Front_End_Name and Collection_Name are unique names used by the Search Appliance to refer to your front end and collection when performing searches. Contact the U of M Google Search Appliance support team if you need these names. The Org_Name variable is your choice. We recommend using a friendly name or acronym that represents your organization so that your Web visitors know they are searching within your sites and not the entire University.

Minimal search form

The following piece of code can be placed in any Web page to create a search form with a text field and a submit button.

<form action="http://google.umn.edu/search" method="GET">
  <input type="text" name="q" maxlength="256" />
  <input type="hidden" name="site" value="Collection_Name" />
  <input type="hidden" name="client" value="Front_End_Name" />
  <input type="hidden" name="proxystylesheet" value="Front_End_Name" />
  <input type="hidden" name="output" value="xml_no_dtd" />
  <input type="submit" value="Search Org_Name" />
</form>

If you want to provide the option to search in different collections, you may use a drop-down menu or radio button group instead of a hidden input for the site parameter. Each menu or radio button choice would submit a different collection name for the site parameter.

Link to front end and collection

The HREF value in the link below is split across multiple lines for readability on this page; used in an actual Web page, you would write it all on one line.

<a href="http://google.umn.edu/search?site=Collection_Name
&output=xml_no_dtd&client=Front_End_Name
&proxystylesheet=Front_End_Name">Search Org_Name</a>

Additional search parameters

The Google Search Protocol Reference describes the search parameters you can use in hidden form inputs, URL query strings, and the XSLT stylesheet editor (front end design). Parameters for the most frequently requested features are explained below.

maximum number of KeyMatch links

To change the maximum number of KeyMatch links returned above the search results (initially three), include a numgm parameter with a value from 0 through 5. If you pass this parameter from a form or link, the setting will stick for subsequent searches on the search results page. If visitors reach your front end via a form or link that does not specify the numgm parameter, you would need to edit the underlying XSLT stylesheet to add the parameter to the search form as a hidden input.

similar results clustered by URL

By default, search results that come from the same site or the same directory on a site are often clustered or folded into a pair of results followed by a "[More results from (URL-pattern)]" link. To disable this feature and show all results together, add a filter parameter with a value of 0.

Contact U of M Privacy
© Regents of the University of Minnesota. All rights reserved.
The University of Minnesota is an equal opportunity educator and employer.

Last modified 2008-03-26 14:20:46 CDT · Retrieved 2012-02-14 11:44:29 CST · URL http://www.umn.edu/google/managers/targetfrontend.html