This section describes operators that can be used to search document fields.
CONTAINS
Selects documents by matching the word or phrase you specify with values stored in a specific document field. Documents are selected only if the search elements you specify appear in the same sequential and contiguous order in the field value. When you use the CONTAINS
operator, you specify the field name to search, and the word or phrase to locate. CONTAINS
operator, the words stored in a document field are interpreted as individual, sequential units. You can specify one or more of these units as search criteria. To specify multiple words, each word must be sequential and contiguous and must be separated by a blank space. American Version of 'Orient Express' Offers Opulent Ride
CONTAINS
operator with sequential, contiguous words to match the document title listed above, assuming it is stored in a title field:
The
CONTAINS
operator does not recognize nonalphanumeric characters. The CONTAINS
operator interprets nonalphanumeric characters as spaces and treats the separated values as individual units. For example, if you have defined a dash (-) as a valid character, and you enter search criteria that include this character, as in on-line, the value is defined as two individual units, as follows:
For example, assume a document field named
AUTHOR
has been defined. To select documents written by Milner, Wagner, and Faulkner, enter the following:
MATCHES
operator, you specify the field name to search, and the word, phrase, or number to locate. You can use question marks (?) to represent individual variable characters within a string, and asterisks (*) to match multiple characters within a string.
For example, assume a document field named
SOURCE
includes the following values:
COMPUTER
, the MATCHES
operator is used as follows:
MATCHES
operator matches COMPUTER
, but not COMPUTERWORLD
, COMPUTER CURRENTS
, or PC COMPUTING
.To locate documents whose source is
COMPUTERWORLD
, the MATCHES
operator is used as follows:
MATCHES
operator matches COMPUTERWORLD
, since each question mark (?) represents specific character positions within the string. COMPUTER
and COMPUTER CURRENTS
are not matched, because their character strings do not match the length represented by the question marks. To locate documents whose sources are
COMPUTER
, COMPUTERWORLD
, and COMPUTER CURRENTS
, the MATCHES
operator is used as follows:
MATCHES
operator matches COMPUTER
, COMPUTERWORLD
, and COMPUTER CURRENTS
, since the asterisk (*) represents zero or more variable characters at the end of the string.To locate documents whose sources include
COMPUTER
, COMPUTERWORLD
, COMPUTER CURRENTS
, and PC COMPUTING
, the MATCHES
operator can be used as follows:
MATCHES
operator matches all four occurrences, since the asterisk (*) represents a string of characters of any length.
For example, assume a document field named
REPORTER
has been defined. To retrieve documents written by Jack, Jackson, and Jacks, enter the following:
For example, assume a document field named
TITLE
has been defined. To retrieve documents whose titles contain words such as "solution," "resolution," "solve," and "resolve," enter the following: