MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 546

Developing coldfusion mx applications
Table of Contents

Advertisement

The following relational operators compare text and match words and parts of words:
Operator
Description
CONTAINS
Selects documents by matching the word or
phrase that 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 query
string 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. When you use the MATCHES
operator, you specify the field name to search,
and the word, phrase, or number to locate. You
can use ? and * to represent individual and
multiple characters, respectively, within a string.
STARTS
Selects documents by matching the character
string that you specify with the starting
characters of the values stored in a specific
document field.
ENDS
Selects documents by matching the character
string that you specify with the ending
characters of the values stored in a specific
document field.
SUBSTRING Selects documents by matching the query
string that you specify with any portion of the
strings in a specific document field.
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, enter the following:
SOURCE <MATCHES> computer
To locate documents whose source is Computer, Computerworld, and Computer Currents, enter
the following:
SOURCE <MATCHES> computer*
546
Chapter 25: Using Verity Search Expressions
Example
• In a document field named
TITLE, to retrieve documents
whose titles contain music,
musical, or musician, search for
TITLE <CONTAINS> Musi*.
• To retrieve CFML and HTML
pages whose meta tags contain
Framingham as a content word,
search for KEYWORD
<CONTAINS> Framingham.
See the text immediately after this
table for examples.
In a document field named
REPORTER, to retrieve
documents written by Clark, Clarks,
and Clarkson, search for
REPORTER <STARTS> Clark.
In a document field named
OFFICER, to retrieve arrest reports
written by Tanner, Garner, and
Milner, search for OFFICER
<ENDS> ner.
In a document field named TITLE,
to retrieve documents whose titles
contain words such as solution,
resolution, solve, and resolve,
search for TITLE <SUBSTRING>
sol.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents