HP StorageWorks Reference Information Storage System V1.1 User Guide (February 2005)

Query expression syntax and matching Chapter 6:
Query syntax and matching
HP StorageWorks Reference Information Storage System User Guide, February 2005 6-11
The negation operators
-
and
!
are exceptions to this rule. They must each be
preceded by a separator, but they need not be followed by a separator. For
example,
carrot-a6
is a single query word, but
carrot -a6
, like
carrot ( - a6 )
, is
equivalent to the Boolean expression
carrot AND ( NOT a6 )
.
Nested Boolean query expressions
Boolean query expressions can be nested, by using Boolean expressions as
arguments of Boolean expressions. To do this, you must enclose the nested
expression in parentheses (
(
,
)
). For example, the following query searches
for documents containing
bird
, but neither
garden
nor
stone
:
bird AND ( NOT (garden OR stone) )
You must provide the same number of opening as closing parentheses, and
they must be properly nested, or an error message will result. For example,
these queries will each result in an error message:
bird AND ( NOT (garden OR stone)
– missing right parenthesis at the end
bird AND ) NOT (garden OR stone( )
– improperly nested parentheses
For clarity, always use parentheses for nested query expressions.
See Also
Query expression examples
, on page 6-12, for more examples of Boolean
query expressions.