HP StorageWorks Reference Information Storage System V1.0 User Guide (May 2004)

LO
Chapter 5:
Query Syntax and Matching
Query Expression Syntax and Matching
5-12 HP StorageWorks Reference Information Storage System User Guide, April 2004
You must provide the proper number of arguments for a Boolean operator, or
an error message will result: one argument for
NOT
(
-
,
!
), two arguments for
each of
AND
(
&&
) and
OR
. For example, these queries will each result in an
error message:
alpha NOT
– missing argument for
NOT
AND alpha
– missing argument for
AND
Boolean operators must be surrounded by one or more separators, typically
whitespace. For example, the query
peas&&carrots
is not equivalent to the
query
peas && carrots
;
peas&&carrots
is a single word (
&
is a word character).
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 )
.
Note:
You cannot search for the words
and
,
or
, or
not
, even using lower-
case query words, because these are stop words (see
Stop Words
,
on page 5-7).
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.