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

LO
Chapter 6:
Query syntax and matching
Query expression syntax and matching
6-8 HP StorageWorks Reference Information Storage System User Guide, February 2005
See Also
Query expression examples
, on page 6-12, for examples of query expres-
sions with fuzzy words.
Matching word sequences
You can use word sequences to find documents with words in a specified
order that are separated a specified maximum distance.
Simple word sequences
To search for an ordered sequence of words, use a
simple word sequence
: a list
of literal query words (no wildcards) separated by spaces (or other separators)
and enclosed in double-quotes (
"
). A document
matches
a simple word
sequence if all the words occur in the document in the same order, with no
intervening words.
For example, the sequence
“like a rolling stone”
does not match a document with
the text
“like a large rolling stone”
because of the intervening word “large.”
Proximity word sequences
Simple word sequences let you search for words that are separated by
separators but not by other 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
Words Compared Similarity Ratio Match?
define
, definite
3/min(6, 8) = 3/6 = 0.5 yes
define, pine
3/min(6, 4) = 3/4 = 0.75 no (0.75 > 0.5)