HP IAP Version 2.1 User Guide, March 2011

Query expression examples
The following are examples of query expressions.
Table 14 Query expression examples
Finds documents with ...Query expression
Either peace or quiet, or both, in either order.
peace OR quiet
Both peace and quiet, in either order.
peace quiet
peace AND quiet
peace && quiet
The single word peace&&quiet.
peace&&quiet
The three words peace, or, and quiet, in any order. or is a word. The
OR operator must be uppercase.
peace or quiet
The words not and quiet. The NOT operator must be uppercase.
not quiet
Illegal. A query cannot be purely negative and must have some positive
expression.
NOT quiet
The three words peace, &, and quiet, in any order. & is a word character.
The AND operator is implied.
peace & quiet
Both peace and quiet. | is a separator. The AND operator is implied.peace | quiet
The word peace but not quiet.
peace NOT quiet
peace -quiet
-quiet peace
Avoid using. Parentheses are needed: peace AND (quiet OR si-
lence).
peace AND quiet OR silence
Avoid using. Parentheses are needed: quiet OR (silence AND
peace).
quiet OR silence AND peace
Any word starting with pea such as: pea, peas, peace, or peach.
pea*
Words such as: peace, peach, or peaches.
pea*c*
Both peace and quiet, in that order, with no intervening words. Examples:
peace quiet or peace $^%+{} quiet.
"peace quiet"
Both peace and quiet, in that order, separated by at most one word.
Examples: peace and quiet; peace, now;%^$ quiet; peace quiet; or
peace george quiet.
"peace quiet"~1
Words similar to peace such as: peaches, piece, place, or plate.
peace~
Both peace and quiet, but not peace followed immediately by quiet. Ex-
amples: quiet peace; quiet blue peace; or peace, water, land, quiet.
(peace quiet)
NOT "peace quiet"
HP IAP 2.1 User Guide 61