Querying with SRS

   

Search Terms

   
  Whichever search method you use, you will need to use some sort of search term. Search terms used in SRS can be categorized as follows:

The rest of this section explains how search terms are constructed. The individual search methods are detailed later in this chapter (see section 3.2 "Quick Searches", section 3.3 "Query Forms", section 3.5 "Expression Queries" and section 3.7 "Browse Index").

Single Word Searches

   
  When you search a databank for a single word, such as "reductase", in a single field, the results of your query will be a list of entries that included that word in the index for the selected datafield.

Multiple-Word Searches

   
  You can search for a phrase having more than one word, such as aldehyde reductase, in several ways. For example, if the phrase is enclosed in quotation marks ("aldehyde reductase"), SRS will search for the complete string, only returning exact matches. If the phrase is not enclosed in quotation marks (aldehyde reductase), SRS will search for each word separately combining the results in some fashion. The default is to require an entry to contain each of the words in the phrase so that a search for aldehyde reductase (without quotation marks) would find entries that have either aldehyde and reductase or the complete string aldehyde reductase.

You can make the relationship between the words explicit by including an operator in the string (see section 8.3.4 "Operators"). For example, you could search for aldehyde & reductase (AND), or aldehyde | reductase (OR), or aldehyde ! reductase (BUTNOT).

Numbers and Dates

   
  SRS uses numerical entries to allow you to search for information such as dates, or entries with a specified length.

Numerical entries can be combined into expressions using various operators. This allows you to search within particular ranges. Typically these operators are: less than; less than or equal; greater than; and greater than or equal. These are created by combining two simpler operators, namely the colon, :, and the exclamation mark, !. The colon means greater than or less than depending on which side of your number it lies. The exclamation mark indicates that the number to the right of the exclamation mark is to be excluded. The exclamation mark can be regarded as "not" or "not equal to". It is probably easier to demonstrate this with some examples:

:15
Greater than or equal to 12, but less than or equal to 15.

:
Greater than or equal to 12, with no specific upper limit.

!12:
Greater than but not equal to 12, with no specific upper limit.

:12
Less than or equal to 12, with no specific lower limit.

:!12
Less than but not equal to 12, with no specific lower limit.
When using the Extended Query Form (see section 3.3.3 "Using the Extended Query Form") such a range search is often simplified for you, so that you do not need to use the query language syntax (see Figure 3.1). Using this method allows you to select the operators from a drop-down list.

Figure 3.1 Extended Query Form showing a numerical data query being set up, using the drop-down lists.

See chapter 8, "SRS Query Language", for more details on the syntax for numerical searches.

Regular Expressions

   
  Regular expression searches are useful when you wish to search for alternative spellings, or words with the same root, but different suffixes, etc. Regular expressions allow you to use a combination of characters, along with regular expression characters, and get a list of matching entries as your result. You always need to include the forward slash (/) character at the start and end of the regular expression string. For example, "/^phos/" will find all words beginning with "phos" (e.g., phosphate, phosphorylase), "/ase$/" will find words ending in "ase" (e.g., kinase, phosphatase). (See section "Regular Expressions" for an explanation.)

Wildcards

   
  The SRS query language also uses the familiar "*" and "?" wildcards. This is usually much simpler than using regular expressions for basic searches. For example, "cell*ase" would find all words starting with "cell" and ending in "ase" (e.g., cellobiase, cellobiohydrolase, cellulase).