Welcome · About INFOMINE · Content · Scope · How to use INFOMINE · Participants
Research & Development · iVia Software · Data Fountains Project · Site History · Customize
More Logos · Publications
An overview of canned_search

The canned_search program is a CGI script that can be used to perform searches on INFOMINE. This page shows how you can embed canned_search queries in your own documents.

As an alternative to constructing your queries by hand, you can use the canned search query generator. It provides an interactive form you can use to set complex query terms and search options, then generates an URL to perform the search.

The remainder of this page shows several examples of the kinds of search that canned_search lets you perform.


The basic search form
This simple form searches all the infomine fields and categories. You can add it to a web page with code like this:
<form action="http://infomine.ucr.edu/cgi-bin/canned_search" method="post">
<input type="text" name="query" value="" size="40" maxlength="100" />
<input type="submit" value="Search" />
</form>

Restricting the fields and categories in a search form
We can restrict the search with the fields and categories parameters. For example, this form searches only for keyword and subject fields in the bioag category. Note that the output uses the formatting for "Biological, Agricultural & Medical Sciences", and that only the KW and SU checkboxes are set in the search box at the bottom.
<form action="http://infomine.ucr.edu/cgi-bin/canned_search" method="post">
<input type="text" name="query" value="" size="40" maxlength="100" />
<input type="hidden" name ="categories" value="bioag" />
<input type="hidden" name ="fields" value="KW,SU" />
<input type="submit" value="Search" />
</form>

MyInfomine : setting the display theme
Use searching for
We can control the way the results are displayed by setting the theme parameter. In order for this to work, we have to have three theme template files on the server, one describing the top section of the page, one describing a single result row, and one descrbing the section of the page extending from the bottom of the search results to the start of the search box.
<form action="http://infomine.ucr.edu/cgi-bin/canned_search" method="post">
Use
<select name="theme">
<option value="defaults">the default theme</option>
<option value="titles">the titles-only theme</option>
<option value="simple">a simple theme</option>
</select>
searching for
<input type="text" name="query" value="" size="40" maxlength="100" />
<input type="submit" value="Search" />
</form>

Other options
Show with searching for
We can control other options, like the number of results to show and the use of stemming. These parameters are called no_of_records_per_page and stemming respectively. Other parameters are detailed in the canned_search parameters table.
<form action="http://infomine.ucr.edu/cgi-bin/canned_search" method="post">
Show
<select name="no_of_records_per_page">
<option value="10">10 results</option>
<option value="20">20 results</option>
<option value="50">50 results</option>
</select>
with
<select name="stemming">
<option value="yes">stemming</option>
<option value="no">no stemming</option>
</select>
searching for
<input type="text" name="query" value="" size="40" maxlength="100" />
<input type="submit" value="Search" />
</form>

Searches launched from hypertext links
Searches that are linked from hypertext links, as opposed to forms, can also accept additional parameters. The canned search query generator provides an interactive form you can use to set complex query terms and search options, then generates an URL for use in hypertext links like these.
A search for forest in the bioag category.
<a href='http://infomine.ucr.edu/cgi-bin/canned_search?query="forest"'>
A search for forest in the bioag category.
</a>
We can create "special collections" by assigning them a unique keyword.
Search for dictionaries the using the keyword REFDICT using the "simple" theme
<a href='/cgi-bin/canned_search?query="REFDICT"&fields=KW&theme=simple'>
Search for dictionaries the using the keyword REFDICT using the "simple" theme
</a>
A search for agriculture "bibliographic databses"
<a http://infomine.ucr.edu/cgi-bin/ canned_search?query=agriculture%20"bibliographic%20databases"'>
A search for agriculture "bibliographic databses"
</a>
A search in a new window
<a target="newwindowname"
href='http://infomine.ucr.edu/ cgi-bin/canned_search?query="research%20summaries"&fields=KW'>
a search in a new window
</a>

Searching for a list of record ids.
This form displays records 2, 23, 234 and 2345. It doesn't actucally perform a search.
<form action="/cgi-bin/canned_search" method="post">
<input type="hidden" name="record_id_list" value="2,23,234,2345" />
<input type="submit" value="Search" />
</form>