Field Operators and Relational Operators

Field operators search document fields that have been defined in a collection. These operators perform filter functions by selecting documents whose fields have the specified values. Searching in document fields is slower than searching in zones. Normally it is not necessary to search in fields because most of the fields are present as zones as well.

Documents that are retrieved using field operators are neither relevance-ranked nor can the MANY modifier be used in conjunction with field operators.

Using the following relational operators, the values of document fields can be compared with search words: = (equal), != (not equal), > (greater than), >= (greater than or equal), < (less than), <= (less than or equal).

For text comparisons the following field operators are available:

Operator name Description
CONTAINS Selects documents by matching the word or phrase you specify with the values stored in a specific document field. Documents are selected only if the search elements specified appear in the same sequential and contiguous order in the field value.
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. If a partial match is found, a document is not selected.
STARTS Selects documents by matching the character string you specify with the starting characters of the values stored in a specific document field.
ENDS Selects documents by matching the character string you specify with the ending characters of the values stored in a specific document field.
SUBSTRING Selects documents by matching the character string you specify with a portion of the strings of the values stored in a specific document field.