Relational Operators


Relational operators search document fields (such as AUTHOR) that have been defined in the collection. These operators perform a filtering function by selecting documents that contain specified field values. The fields that are used with relational operators can contain alphanumeric characters. Documents retrieved using relational operators are not relevance-ranked, and you cannot use the MANY modifier with relational operators.

A number of relational operators are available for numeric and date comparisons, including the following: = (equals), > (greater than), >= (greater than or equal to), < (less than), <= (less than or equal to). See "Operators for Searching Numeric Fields" in Chapter 3 for examples and more detailed descriptions.

The following table briefly describes the relational operators are available for text comparisons; see "Operators for Searching Text Fields" in Chapter 3 for examples and more detailed descriptions.

Operator Name
Description
CONTAINS
Selects documents by matching the character string you specify with 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.
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. When a partial match is found,the 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.
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.




Copyright © 2001, Verity, Inc. All rights reserved.