HP Software Reference Information Storage System v1.6 User Guide (T3559-90810, November 2008)

Boolean query expressions
You can combine words, fuzzy words, and word sequences using Boolean (logical) operators AND, OR,
and NOT (these must be uppercase). The following table describes Boolean operators, where exp, exp1,
and exp2 represents a word, fuzzy word, word sequence, or other Bo olean query expression.
Table 11 Boolea
n query expressions
Syntax
Matches
NOT exp
alternative syntax: - exp
alternative syntax: ! exp
all do cuments that do not match exp
exp1 OR exp2
all documents that match either exp1 or exp2
exp1 AND exp2
alternative syntax: exp1 && exp2
alternative syntax: exp1exp2
all documents that ma tch both exp1 and exp2
NOTE:
ThesecondalternativesyntaxforANDindicatesthatANDisthedefaultconnectiveinqueryexpressions.
You do not need to supply AND explicitly. It is assumed if neither AND nor OR is used explicitly. For
example, the query peace quiet is equivalent to the query peace AND quiet.
A NOT expression must be combined, using AND or OR, with another expression other than NOT.A
query c annot consist solely of ne gative criteria.
NOT quiet
illegal
(NOT quiet) AND (NOT blue) illegal
NOTquietANDblue legal
NOT quiet OR nois*
legal
You must provide the proper number of arguments for a B oolean operator or an error m essage results:
oneargumentforNOT (- or !), two arguments for AND (&& )andOR. For example, the following
queries result in an error message.
alpha NOT:MissingargumentforNOT
AND alpha: Missing argument for AND
Boolean o perators must be surrounded by one or more separators, typically white space. For example,
the query peas&&carrots is not equivalent to the query peas && carrots; peas&&carrots is a
single word (& isawordcharacter).
Negation operators (- and !) are exceptions to this rule. They must 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,likecarrot (- a6), is e quivalent to the Boolean expression carrot AND (NOTa6).
Nested Boolean query expressions
You can nest Boolea n query expressions using Boolean expressions as arguments of Boolean expressions.
For example, the following quer y searches for documents containing bird,butnotgarden or stone:
bird AND NOT (garden OR stone)
User Guide
43