- Data Portals
- User Support
- About Us
UCAR uses the Google Custom Search Engine (CSE) as its primary search engine. This free service for educational institutions enables us to search all *.ucar.edu Web sites as well as additional domains like nsdl.org and dlese.org and wrap the results in our own interface. You can add the UCAR Google search form to your own websites by following the instructions included on this page.
Drupal Search can be accessed via the "Content" tab in the search results page of any UCAR Drupal site. Google powers the UCAR-wide search tab which searches across all publicly-accessible UCAR sites indexed by Google whereas the "Content" tab is powered by Drupal's own search engine which searches only the current site. If you are looking for a recently created page on a specific site, Drupal search is more likely to return the page since Google indexes UCAR content on a less frequent basis with a monthly deep crawl and weekly maintenance crawl.
Google provides the following default code example for their CSE service.
Here are some additional search form code examples for taking greater control of how the search form appears.
The style attribute in the form tag is optional and simply removes the white space browsers add under a form. To maintain consistency throughout UCAR sites, it is recommended that all three elements: the field, button and advanced link be on one line as you see in the example. They can be included in the header, subnav, below the subnav or wherever is appropriate in your page design. Research has shown that users look for search in the upper right of Web pages. The advanced link should have a small font size.
The form above sends it's results to a search results template on the www.ucar.edu website. If you prefer to keep search results within your own site template, insert the following code into your own search results page and change the form action in the form above to point to your file. Note, the include file directive here is for JSPs.
On certain pages in your site, you may want to perform a search on a limited set of pages. Examples include documentation, news, and research. Using a hidden input tag with the name "hq" you can submit parameters to Google that are hidden from the user. Then, using the "site:" query modifier in the value of the "hq" tag, you can specify a site domain name and optionally a directory path as well. Please be sure to modify the button name to let users know they are performing a specific search. In the example below, they are searching CISL documentation, so the button reads "Search CISL Docs." If we were searching the entire CISL site, the button would read "Search CISL."
Google provides a number of query modifiers such as the "site:" modifer above that can be useful for limiting search domains, performing boolean logic, and controlling the user experience. These can be used in several ways:
|site:||Restricts the results to the given domain. For example, "site:www.unidata.ucar.edu" would only return pages from the Unidata website that meet the search criteria. Note there can be no space between "site:" and the domain. Directories can also be added. For example, "site:www.unidata.ucar.edu/software"|
|allintitle:||Restricts the results to those with all of the query words in the title. For example, "allintitle: mass store" will return only documents that have both "mass" and "store" in the title.|
|intitle:||Works like allintitle except it only allows one word. Note there can be no space between "intitle:" and the following word. For example, "intitle:mss"|
|allinurl:||Restricts the results to those with all of the query words in the url. For instance, "allinurl: cisl mss" will return only documents that have both "cisl" and "mss" in the url. Note that allinurl works on words, not url components. In particular, it ignores punctuation. Thus, "allinurl: foo/bar" will restrict the results to pages with the words "foo" and "bar" in the url, but won't require that they be separated by a slash within that url, that they be adjacent, or that they be in that particular word order. The "site:" modifier is a better choice for this kind of control.|
|inurl:||Works like allinurl except it only allows one word. Note there can be no space between "inurl:" and the following word. For example, "inurl:news"|
For additional query modifiers, view the source code of the Google Advanced Search form. Additional modifiers include:
We hope you enjoy UCAR's Google search service. Please let us know at firstname.lastname@example.org if you have any feedback or suggestions on how we can further improve UCAR search services or this documentation.