Adobe COLDFUSION 9 Manual page 519

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
<cfsearch name="results"
collection="#form.collname#"
criteria="#LCase(form.criteria)#"
type="#form.type#">
Prefix and infix notation
By default, Verity uses infix notation, in which precedence is implicit in the expression; for example, the AND operator
takes precedence over the OR operator.
You can use prefix notation with any operator except an evidence operator (typically, STEM, WILDCARD, or WORD;
for a description of evidence operators, see
explicitly specifies precedence. Rather than repeating an operator, you can use prefix notation to list the operator once
and list the search targets in parentheses. For example, the following expressions are equivalent:
• Moses <NEAR> Larry <NEAR> Jerome <NEAR> Daniel <NEAR> Jacob
• <NEAR>(Moses,Larry,Jerome,Daniel,Jacob)
The following prefix notation example searches first for documents that contain Larry and Jerome, and then for
documents that contain Moses:
OR (Moses, AND (Larry,Jerome))
The infix notation equivalent of this is as follows:
Moses OR (Larry AND Jerome)
Commas in expressions
If an expression includes two or more search terms within parentheses, a comma is required between the elements
(whitespace is ignored). The following example searches for documents that contain any combination of Larry and
Jerome together:
AND (Larry, Jerome)
Precedence rules
Expressions are read from left to right. The AND operator takes precedence over the OR operator; however, terms
enclosed in parentheses are evaluated first. When the search engine encounters nested parentheses, it starts with the
innermost term.
Example
Moses AND Larry OR Jerome
(Moses AND Larry) OR Jerome
Moses AND (Larry OR Jerome)
Delimiters in expressions
You use angle brackets (< >), double quotation marks ("), and backslashes (\) to delimit various elements in a search
expression, as the following table describes:
"Evidence
operators" on page 518). In prefix notation, the expression
Search result
Documents that contain Moses and Larry, or Jerome
(Same as above)
Documents that contain Moses and either Larry or Jerome
Last updated 8/5/2010
514

Advertisement

Table of Contents
loading

Table of Contents