The Wayback Machine - https://web.archive.org/all/20060427134956/http://www.stanford.edu:80/services/websearch/Google/subcollections.html
STANFORD UNIVERSITY

INFORMATION TECHNOLOGY SERVICES

Overview

Schools and other large organizations may be eligible to define a subcollection in the Google Search Appliance.

A subcollection is a list of URL patterns that can be referred to by a single name, such as "Library". When a search is restricted to the collection called "Library", the query includes only the URL patterns specified in that subcollection's definition.

Defining and using a subcollection requires startup effort from both the Stanford search administrator and the web site developer. If you think you are eligible and want to define a subcollection, complete the steps below.

Note that a new subcollection, or any changes to an existing subcollection, will not take effect until the next scheduled crawl (see the current crawl schedule).

1. Request a subcollection

Submit a request for a subcollection via HelpSU. Include the following information:

  1. name of the school or organization
  2. contact person
  3. the name you want for your subcollection
    A subcollection name can be up to 20 characters long and can contain only alphanumerics, underscores, and dashes; the name cannot begin with a dash.
  4. the list of URL patterns you want included in your subcollection

2. Add the subcollection parameter to your search feature's HTML

<form method='get' action='http://find.stanford.edu/search'>
<input type='text' name='q' size='32' maxlength='255' value=''/>
<input type='submit' name='btnG' value='Search'/>
<input type='hidden' name='site' value='stanford'/>
<input type='hidden' name='client' value='stanford'/>
<input type='hidden' name='proxystylesheet' value='stanford'/>
<input type='hidden' name='output' value='xml_no_dtd'/>
<input type='hidden' name='restrict' value='<subcollection_name>'/>
</form>




About the subcollections stylesheet

The subcollections stylesheet has a wider results-list layout than the stylesheet used on the main Stanford search site. It includes a drop-down menu of all the defined subcollections, and does not include a People search option or Stanford-homepage-style navigation to the Stanford Directories and A-Z index.

subcollection stylesheet layout

Customizing the subcollections stylesheet

Yes, you can customize the subcollections stylesheet to modify the way your search results pages look. Before you decide to do this, be aware that:

Still, you might want to:

Here are the steps to get you started:

  1. Download the stylesheet: stanford_stylesheet.xslt
  2. Copy the stylesheet to your web space and give it a file name related to your subcollection name
    e.g.:
          mydept-style.xslt
  3. Modify the parameters of the search feature on your web site, to refer to the new stylesheet.

    <form method='get' action='http://find.stanford.edu/search'>
    <input type='text' name='q' size='32' maxlength='255' value=''/>
    <input type='submit' name='btnG' value='Search'/>
    <input type='hidden' name='site' value='stanford'/>
    <input type='hidden' name='client' value='stanford'/>
    <input type='hidden' name='proxystylesheet'
    value='http://www.stanford.edu/dept/mydept/mydept-style.xslt'/>

    <input type='hidden' name='output' value='xml_no_dtd'/>
    <input type='hidden' name='restrict' value='<libraries>'/>
    </form>
  4. Customize and test the stylesheet (see notes below)

Notes about customization & testing

Sections of the stylesheet are labelled according to what they affect, and marked either "can be customized" or "do not customize". We strongly recommend you follow these guidelines.

<!-- *****************************************************
Logo setup (can be customized)
- whether to show logo: 0 for FALSE, 1 (or non-zero) for TRUE
- logo url
- logo size: '' for default image size
********************************************************* -->
<xsl:variable name="show_logo">1</xsl:variable>
<xsl:variable name="logo_url">images/Title_Left.gif</xsl:variable>
<xsl:variable name="logo_width">200</xsl:variable>
<xsl:variable name="logo_height">78</xsl:variable>

If you make changes to the stylesheet you'll want to test its appearance. The Google Search Appliance caches stylesheets, so to force it to reload your stylesheet when you've made a change, add this line to the search feature's <form> tag (see step 3 above):

<input type='hidden' name='proxyreload' value='1'/>

Since forcing a reload may slow the display of the results page, you should remove this line when your testing is complete and you're ready to publish your page on the web.

 

If you have questions about subcollections or the subcollection stylesheet, enter a HelpSU request.

Last modified Wednesday, 18-Jan-2006 08:54:53 AM

Stanford University Home Page