Skip to page content Home Hosting Development Tools & Services Help Desk    
 

Tools: Search

How to Search Your Site Only

If you use the search form provided in the template starter page without modification, your form will use the default BSD search engine scope, which includes all sites within the *.bsd.uchicago.edu domain. In order to target your search form to return results from your site only, you must do two simple things:

  1. Request that BSDIS create a search subcollection for your site.
  2. Once the subcollection has been setup BSDIS will provide you with the name to use (generally this will match your site name). Configure your search form to use the subcollection by name. An example is below.

Example form code for site search

The formatting (stylesheet references and background image) in this example are optional. The form action and inputs are required. Put your subcollection name as the value of the restrict input element.

Please note that if you are customizing the template starter page sample code to create your site, you can probably just uncomment the restrict input on the provided HTML and add your subcollection value.

<form method="get" id="gs" class="gs" action="http://search.bsd.uchicago.edu/search">
<input type="text" name="q" size="12" maxlength="100" value="" class="formInput" />
 <input type="image" src="img/button_search.gif" class="imgover" alt="Search this site" align="absmiddle" />
<input type="hidden" name="ie" value="" />
<input type="hidden" name="site" value="bsd_domain" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="client" value="bsd_domain" />
<input type="hidden" name="lr" value="" />
<input type="hidden" name="proxystylesheet" value="bsd_domain" />
<input type="hidden" name="oe" value="ISO-8859-1" />
<input type="hidden" name="restrict" value="NAME OF YOUR SUBCOLLECTION" />
</form>