MATCHES

Selects documents by matching the character string you specify with values stored in a specific document field. Documents are selected only if the search elements specified match the field value exactly.

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
COMPUTERWORLD
COMPUTER CURRENTS
PC COMPUTING

To locate documents whose source is COMPUTER, the MATCHES operator is used as follows:

SOURCE <MATCHES> computer

Here, the 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:

SOURCE <MATCHES> computer?????

Now, the 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 specific character positions.

To locate documents whose sources are COMPUTER, COMPUTERWORLD, and COMPUTER CURRENTS, the MATCHES operator is used as follows:

SOURCE <MATCHES> computer*

Here, the 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:

SOURCE <MATCHES> *comput*

Now, the MATCHES operator matches all four occurrences, since the asterisk (*) represents a character string of any length.