Use the ORDER
modifier to specify that search elements must
occur in the same order in which they were specified in the query. If
search values do not occur in the specified order in a document, the
document is not selected. You can use the ORDER
modifier with
these operators: PARAGRAPH
, SENTENCE
,
NEAR/N
, and ALL
.
Always place the ORDER
modifier just before the operator.
The following syntax examples show how you can use either simple syntax or
explicit syntax to retrieve documents containing the word "president"
followed by the word "washington" in the same paragraph:
Simple syntax:
president <ORDER><PARAGRAPH> washington
Explicit syntax:
<ORDER><PARAGRAPH> ("president", "washington")
To search for documents containing the words "diver", "kills", "shark" in that order within 20 words of each other, use one of the following queries:
diver <ORDER><NEAR/20> kills <ORDER> <NEAR/20> shark <ORDER> <NEAR/20> (diver, kills, shark)
You can use the NEAR/N
operator with the
ORDER
modifier to duplicate the behavior of the
PHRASE
operator. For example, to search for documents
containing the phrase "world wide web", you can use the following
syntax:
world <ORDER><NEAR/1> wide <ORDER><NEAR/1> web
To search for a word between two other words, you can use the ORDER modifier with the ALL operator, like this:
<ORDER><ALL>(dog, cat, squirrel)
The above query searches for "cat" between "dog" and "squirrel". Stemmed variations of the words will match the query.
The between query can be extended to include subquery expressions. For example:
<ORDER><ALL> (dog, fat cat, squirrel)
The above query searches for thephrase "fat cat" between the words "dog" and "squirrel". Again, stemmed variations of the words are considered a match.