Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Services and Technology Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help


Related Links

Google search at MIT

Add & restrict pages

Add a search box on your site

Additional Search Form Parameters

Update to Google v.4

Collections

Search Results Stylesheet



Update to Google v4

Overview

There are critical updates to Google search forms that need to be applied before October 30, 2006.

This page provides instructions for MIT web publishers to upgrade an existing search form to Google v4 compatibility. Please read the section that best applies to your web form:

  1. All search forms need these two changes
  2. Forms that use a subcollection
  3. Changes to the Custom Results Stylesheet

We strongly suggest that you upgrade the search form on your web site as soon as possible.


All search forms

All existing forms will need these two changes to be compatible with Google v.4.

  1. Change the form action target from:
  2. <form method='get' action='http://gb-server.mit.edu/search'>

    to:

    <form method='get' action='http://search.mit.edu/search' >


  3. Change the proxystylesheet parameter from:

  4. <input type='hidden' name='proxystylesheet' value='http://web.mit.edu/xsl/google-mit.xsl'/>

    to:

    <input type='hidden' name='proxystylesheet' value='mit'/>


    Note: If you created a custom results stylesheet, skip this step and see below.

Your form should now look similar to the following:

<form method='get' action='http://search.mit.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='mit'/>
<input type='hidden' name='client' value='ist'/>
<input type='hidden' name='proxystylesheet' value='mit'/>
<input type='hidden' name='output' value='xml_no_dtd'/>

<input type='hidden' name='as_dt' value='i'/>
<input type='hidden' name='as_sitesearch' value='web.mit.edu/your_URL' />

</form>

Instructions for Web Publishers provides additional reference for the relevant search parameters in the form above.


Forms that use a subcollection

If your web form uses a subcollection (now termed collection), you will also need to make the following changes to your search form:

  1. Delete the restrict parameter, which specifes the name of your (sub)collection:

  2. Delete: <input type='hidden' name='restrict' value='your_subcollection_name'/>


  3. Change the site parameter from:

  4. <input type='hidden' name='site' value='mit'/>

    to:

    <input type='hidden' name='site' value='your_subcollection_name'/>


Forms that use a Custom Results Stylesheet

If your search form uses a custom results stylesheet for use with MIT-Google, you may leave your proxystylesheet parameter (which specifies the URI of your stylesheet) in your search form unchanged.

However, you will need to update your stylesheet (XSLT file) to work with the new Google v4 appliance. The process of updating your custom stylesheet is technically involved—below are some general guidelines that may help you. However, IS&T cannot provide support for updating customized stylesheets; please contact Web Communications Services (WCS) for fee-based consulting.

Guidelines for updating your stylesheet:

  1. Identify your specific modifications in your customized XSLT stylesheet by comparing the differences between your customized stylesheet and the default, unmodified Google v3 XSLT stylesheet. You can use the diff utility on Athena to help you identify your customizations.
  2. Apply your identified customizations to the new default Google v4 XSLT stylesheet:

    • Apply modifications incrementally and test your new v4 stylesheet after each modification. Use this form to test your stylesheet. (Note: your stylesheet must be web-accessible for testing.)
    • If your modifications include the html_escaped_query_mit and/or html_site_query_mit variables, be sure to apply those first to the new stylesheet before applying other modifications.

  3. If your stylesheet generates search forms in the results page, be sure to update the form parameters for Google v4 compatibility (as described above). In particular, pay special attention to the form parameters that have been updated:

    Additionally, you may find it helpful to look at the reference MIT-branded XSLT stylesheet google-mit.v4.xsl. The mit_search_form template (within the google-mit.v4.xsl stylesheet) provides an improved model for generating search forms within the search results page.

[Back to top]

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.