Customizing Your Search
One of the more powerful tools available to website coordinators in the Google Enterprise Search A (Google ESA) is what is known as "collections" and "Front-ends". In combination with a collection, a front-end is a group of settings that can help you customize search results in a variety of ways. This page provides some guidance on customizing search results using collections and front-ends.
Contents
- What are Manager Accounts?
- What are Collections?
- What are front-ends?
- How do I use a front-end?
- How can I get a front-end created?
- Search box code for a collection/front-end
What are Manager Accounts?
A manager account can be used on the Google ESA to configure collection and front-end combinations to provide custom search results. The account provides access to the appliance's Web based interface, in which the configuration changes are made. To learn more about this service, please contact the ITS Service Desk at 756-7000 to request assistance with a Google ESA manager account. Someone from the Web Coordination Team will contact you. (NOTE: Due to ITS resource limitations, the custom search results service is a self-serve model.)
What are Collections?
Collections are sub-sets of URLs from the master index collection and provide the basis for a customized search. Collections are configured on the Google ESA using the manager account. A collection can contain URLs that comprise multiple web sites, or only one web-site. Collections can be used to exclude certain files from a search experience.
The collection is used to configure the URLs that you want your front-end to search across.
What are Front-ends?
At its most basic level, a "front-end" is simply a lens for presenting the search results. The front-end is used to handle search queries against a collection of URLs. To accomplish this, front-ends can be edited to control the results from a search, ranging from restricting content access to shaping the presentation of search results:
- Front-ends can be used to tie specific words or phrases to specific URLs or pages ("
KeyMatch") and can also be used to customize how Google handles certain synonyms ("Related Queries") - Front-ends can be used to control the presentation of search results, making it possible to blend your search results pages into your web site ("
Format"). - Front-ends can be used to control search results based on file-types, languages used, matching meta tags, directories, and even domain names ("Filters"). Specific URL patterns can also be restricted from the search results ("
Remove URLs").
(The words in parentheses in the list above are the names of the tabs within the Serving > Front Ends section in the Google ESA's web-based interface.)
NOTE: Due to ITS resource limitations, the custom search results service is a self-service model. Although the Google ESA has the capacity to create multiple collections, with multiple front-ends for each collection, ITS offers only one collection and front-end combination for a unit / department. If you are interested in exploring this options, please contact the ITS Service Desk at 756-7000 to request assistance with a Google search appliance. Someone from the Web Coordination Team will contact you.)
How do I use a Collection/Front-end combination?
All of the functionality of collection/front-end combinations is available through a web-based interface in the Google ESA using a manager account. Once a collection/ front-end combination has been created for you (see "How can I get a collection/front-end created?" below), you can then log in to the appliance and navigate to the collection or front-end to which you have access (access instructions are provided when the collection/front-end is created). Extensive documentation is provided in the appliance's web-based interface, which should help walk you through the process of using the various options available for collections and front-ends (Filters, Remove Urls, KeyMatch, Related Queries, Format).
NOTE: If you are interested in customizing the search results pages through your front-end (the "Format" option in a front-end), the appliance provides two options for customizing the search results pages. The appliance has a "wizard" that can step you through some basic customizations (logo, colors, etc.). Alternatively, if you are familiar with XSLT stylesheets, you can edit the underlying XSLT stylesheet that controls the search results pages. Please be aware that all new front-ends created by the Google administrator will be pre-populated with a custom Cal Poly stylesheet (a file version can be obtained through the front-end by copying the XSLT text and pasting into a text file)--if you would prefer to use the wizard, you will want to "revert" to the default stylesheet and then use the wizard.
NOTE: The XSLT stylsheet code is very clear on what areas are meant to be edited for customizing, and what areas are not intended to be edited. If you choose to edit the not-intended-to-be-edited areas of the stylesheet, the appliance may reject your submission. Please note, ITS does not provide assistance with modifying the XSLT stylesheet required for search results.
To get your front-end working on your website, make sure to use the front-end name in the "proxystylesheet" and "client" parameters/options/inputs. (The "proxystylesheet" parameter dictates search results formatting, while the "client" parameter dictates content/URL filtering for the search results.) Sample search form HTML source code is provided on the "Creating a Search Form" page.
How can I get a collection/front-end created?
The first step to working with a collection/front-end combination is requesting a Google manager account on the search appliance. This is done through a request to the ITS Service Desk at 805-756-7000.
- In requesting a new collection/front-end, please indicate the following information:
- The department or unit for which the collection/front-end is needed.
- Contact information for a staff or faculty Web developer/webmaster associated with the collection/front-end. Please include:
- The person's name;
- The person's e-mail address
- The person's My Cal Poly login id (not the password)
The Web Coordination Team tries to process all Google front-end requests as soon as they come in. Our goal is to provide a turnaround within 48 hours. Basic login instructions for a manager account will be included with any response to a manager account request.
Availability of New/Modified collections/front-ends:
Newly created or modified collection/front-end combinations will generally require one to two hours after modification before it can return results (it can take one to two hours to populate a collection with URLs).
Launching/Re-launching a Web site:
If you have recently launched (or re-launched) your Web site, your search form may not return the expected results for a period of time while the site is crawled (or re-crawled) by the Google ESA.
Search box code for a collection/front-end
The search box used to access a collection/front-end can look like the following examples depending on what is needed:
To include the above search box in a Web page, cut and paste the follow code into your HTML:
<form action="http://google1.calstate.edu/search" method="get" title="Search Form">
<div><label for="gsearch">Sample Form 1 - Search the Web Coordination Team sites using the Google Search Appliance</label><br />
<input type="text" name="q" id="gsearch" title="Search Text" accesskey="s" alt="Search Text" size="45" maxlength="256" value="" />
<input type="submit" name="btnG" value="Search"/>
<input type="hidden" value="slo-wct" name="site"/>
<input type="hidden" value="slo-wct" name="client"/>
<input type="hidden" value="slo-wct" name="proxystylesheet"/>
<input type="hidden" value="xml_no_dtd" name="output"/></div>
</form>
The highlighted sections of this code, "slo-wct", should be replaced with the name of your collection and front-end as follows:
For the site parameter, value="your collection name"
The client parameter, value="your front-end name"
The proxystylesheet parameter, value="your front-end name"
After inserting the form code into your site and modifying the highlighted sections to correspond to your collection and front-end, you are ready to serve up search results on your site using the Google Search Appliance.
This next example allows the users to select a radio button to determine what set of URLs to search across:
To include the above search box in a Web page, cut and paste the follow code into your HTML where you want the search box to appear:
<form action="http://google1.calstate.edu/search" method="get" >
<div><label for="gsearch">Sample Form 2 - radio buttons allow multiple site
search: Web Coordination Team sites or all Cal Poly sites,
using the Google Search Appliance</label> <br />
<br />
<input type="text" name="q" id="g_search" title="Search Text" accesskey="s" alt="Search Text" size="45" maxlength="256" value="" />
<input type="submit" name="btnG" value="Search"/>
<br />
<fieldset>
<legend>Choose a site to search:</legend>
<input id="its" value="slo-its" name="site" checked="checked" type="radio"/>
<label for="its">ITS Sites</label>
<input id="all" value="slo-CalPoly" name="site" type="radio"/>
<label for="all">All Cal Poly Sites</label>
</fieldset>
<input value="slo-CalPoly" name="client" type="hidden"/>
<input value="slo-CalPoly" name="proxystylesheet" type="hidden"/>
<input value="xml_no_dtd" name="output" type="hidden"/></div>
</form>
The highlighted sections of this code, "slo-its" and "slo-CalPoly", should be replaced with the name of your collection and front-end as follows:
For the site parameter, value="your collection name"
The client parameter, value="your front-end name"
The proxystylesheet parameter, value="your front-end name"
After inserting the form code into your site and modifying the highlighted sections to correspond to your collection and front-end, you are ready to serve up search results on your site using the Google Search Appliance.
NOTE: If you have a custom search results format for your front-end, this is controlled by the "proxystylesheet" parameter in your form. In the sample form above, this parameter is hidden, so all search results will appear in whatever results format are defined for your front-end. If you want the search results to appear differently depending on which front-end filter the user has chosen with the "client" radio input, you will need to implement something programatically on your site to make that happen (such as a small JavaScript routine that parses the value for the "client" option and sets the "proxystylesheet" input to the same value).
Availability of New/Modified collections/front-ends:
Newly created or modified collection/front-end combinations will generally require one to two hours after modification before it can return results (it can take one to two hours to populate a collection with URLs).
Launching/Re-launching a Web site:
If you have recently launched (or re-launched) your Web site, your search form may not return the expected results for a period of time while the site is crawled (or re-crawled) by the Google Search Appliance.
