skip to content
 

Introduction

The search service at search.cam.ac.uk can be used to search University-wide or to search specific servers (or parts of servers). It can therefore be used by webmasters around the University to provide a search facility for their servers or for specific collections of information on their servers without the need to run search software locally, assuming that the servers are being indexed for searching and that the scope of the indexing and the available search facilities meet their needs. If you are unsure whether your web content is being indexed, email  telling us the URLs of the web content concerned.

The new search interface uses filtering parameters differently to the old interface but the old parameters are rewritten into the new format by the frontend so previous customisation will continue to work.

The search service at search.cam.ac.uk will search the whole University index. It allows the following:

  • specification of an institution (the "inst" parameter) to limit results to that institution
  • specification of  a search tag (the "tag" parameter) that refers to a list of urls that should be searched.

In order to edit existing values for these parameters or add new ones please email search-support@uis.cam.ac.uk.

Examples of the code to paste into your page to use filters are shown below. To change the text on the search button, alter the text in value="" that comes after 'input type="submit"' (shown in the example as 'Search UIS news'. There are some additional attributes that should be added for accessibility purposes - the 'label' attribute ties the label to the appropriate input, and the accesskey value allows people using the University templates and a speaking browser easy access to search.

<form method="get" action="http://search.cam.ac.uk/web"> <label for="query">Enter your search</label>
    <p>
        Enter your search: <input type="text" name="query" />
        then select <input type="submit" value="Search Physics" id="query" accesskey="4" />
        <input type="hidden" name="inst" value="PHY" />
    </p>
</form>

When this search is used the results come back as follows:

<form method="get" action="http://search.cam.ac.uk/web"> <label for="query">Enter your search</label>
    <p>
        Enter your search: <input type="text" name="query" />
        then select <input type="submit" value="Search Physics CTA" id="query" accesskey="4" />
        <input type="hidden" name="tag" value="cta" />
    </p>
</form>

When this search is used the results come back as follows:

Dynamic search filters

There are some cases where it is impractical to manually create a search filter in our system for every filtered search you want to do.  Examples include: limiting the search to specific issues of the reporter, or to the pages of individual users. We have developed an alternative mechanism for these situations.

To perform a dynamic filtered search, use the following parameter in your URL:

include - A comma-separated list of URLs to include or exclude if prepended by -

A search result will only be displayed if it matches one or more include URLs, and does not match any URLs prepended by -.

An example would be:

<form method="get" action="http://search.cam.ac.uk/web"><p>
Enter your search: <input type="text" name="query" />
then select <input type="submit" value="Search University research articles excluding COVID" />
<input type="hidden" name="include" value="http://www.cam.ac.uk/research,-covid" />
</p></form>

 

Notes about html encoding

When characters that have special meaning in HTML (in particular, "<", "&", and ">") are needed as normal text they must be encoded as HTML named or numeric character entities.

Comments and questions about the topics covered in these documents can be sent to 

Last updated: April 2021