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-10 HP StorageWorks Reference Information Storage System User Guide, April 2004
Proximity Word Sequences
Simple word sequences let you search for words that are separated by
separators but not by other words (except stop words). To search for
document words that are in an ordered sequence, but that may be separated
by other words, use a
proximity word sequence
.
To write a proximity word sequence, you use the same syntax as that of a
simple word sequence, but you append a tilde (
~
) character to the second
double-quote, and follow that with a proximity value numeral. The proximity
value represents the maximum number of other document words that can
occur between any two successive words of the sequence. A document
matches
a proximity word sequence if all the words occur in the document in
the same order, with at most N intervening words, where N is the proximity
value.
For example, the sequence
“bird garden stone”~3
will match any document that
has these three words in this order, with
bird
and
garden
separated by no more
than three words, and
garden
and
stone
separated likewise. It will match a
document with the text “a
bird
in the rose
garden
is sitting near a flat
stone
”
because (besides stop words) there are at most three words between
successive sequence words. It will also match “a
bird
garden
with a
stone
” for
the same reason.
Simple word sequences are a special case of proximate word sequences:
"..."
=
"..."~0
. Note also that any documents found by
"..."~
N will also be found by
"..."~
M, whenever M > N.
See Also
•
Query Expression Examples
, on page 5-13, for examples of query expres-
sions with word sequences.
Boolean Query Expressions
Boolean Operator Syntax
You can combine words, fuzzy words, and word sequences using the Boolean
(logical) operators
AND
,
OR
, and
NOT
(these must be uppercase). The following
table describes the Boolean operators, where each of
exp
,
exp1
, and
exp2