MIT Search

 

Creating a Specific Search Interface


The current MIT Search Engine (Inktomi) is now documented at http://web.mit.edu/search/help/

Ultraseek allows MIT web publishers to create a customized search interface for a specific set of pages. The results from a search can be customized to return results meeting a publishers defined criteria. One useful feature of Ultraseek is that web publishers can invisibly integrate "form variables" into their search pages to achieve this result.

Ultraseek gives you a number of options for creating a search interface, from a simple box to an advanced menu-driven interface.

You do need a basic understanding of forms to build a more advanced search.

Searching a Single Set
A typical customized search interface will restrict a search's result to a certain set. such as an Athena locker or web server. The syntax for this would add a "query prefix", or qp, variable, as in the HTML below:

<form name=seek method=GET action="http://search.mit.edu/query.html">
<input type=hidden name=qp value="url:web.mit.edu/admissions/www/">
<input type=text name=qt size=40 value="" maxlength=500>
<input type=submit value=" Search ">
<a href="http://search.mit.edu/help/">Help</a>
</form>

Adding this code to your page will display a search interface that will search only the admissions pages, which begin with web.mit.edu/admissions/:
Search Admissions:
  Help

Searching Multiple Sets
Web publishers may have more than one "set" of content that they would like users to be able to search from one interface. A department such as Personnel might want users to be able to search the whole site or just their job listings. The code below offers users the choice.

<form name=seek method=GET action="http://search.mit.edu/query.html">
<input type=radio name=qp value="url:web.mit.edu/personnel/" checked>Personnel Website<br> <input type=radio name=qp value="url:web.mit.edu/personnel/jobs/">Job Listings Only<br>
<input type=text name=qt size=40 value="" maxlength=500>
<input type=submit value=" Search ">
<a href="http://search.mit.edu/help/">Help</a>
</form>

Adding this code to your page will display a search interface with radio buttoms that will search all the personnel pages, or just the job listings:
Search Personnel:
Personnel Website Job Listings Only
   Help

More options can be added using the same type of code with other "sets" filled in for the value. Web publishers may also choose to show checkboxes or drop down menus. More information on how to construct a form is available at http://web.mit.edu/cwis/docs/forms.html.



Options for Results
Ultraseek allows users to choose how they see results from a query, including number of hits, how they are sorted, and if summaries are shown. To add this option to a search interface, this code needs to be added before the </form> tag:

<select name=nh>
<option value="10" selected>10 hits
<option value="25">25 hits
<option value="100">100 hits
<option value="500">500 hits
</select>
<select name=rf>
<option value="0" selected>sort by relevance
<option value="1">sort by date
</select>
<select name=lk>
<option value="1" selected>show summaries
<option value="2">hide summaries
</select>
<br>

Search Admissions:
   Help



mit Comments to cwis-help@mit.edu
$Date: 2002/01/03 04:25:06 $