Database Reference
In-Depth Information
<query>
<phrase>
<term> exist </term>
<term> database </term>
</phrase>
</query>
• With the near element, you can build even more specific phrase queries. Its syn‐
tax is:
<near slop? = integer
ordered? = "yes" | "no" >
#PCDATA | ( term | first | near )+
</near>
— The optional slop attribute allows you to define the “slop” for the matching.
Slop is the maximum number of other words between the words searched
upon.
— The optional ordered attribute defines whether or not the terms must be in
the defined order. The default is "yes" .
— If the near element contains character data, this is tokenized. The effect is the
same as using the phrase element with character data.
— Instead of tokenized character data, you can use nested term elements.
— The first element allows you to search against the start of the text. It has an
optional end attribute to specify the maximum distance (in words) allowed
from the start of the text:
<first end? = integer >
#PCDATA | ( term | near )+
</first>
— To allow even more complex search expressions, you can nest near elements
within one another, or within first elements.
For instance, the following expression will search for nodes with the word exist
somewhere in the first 4 words of the text and the word database within 10 other
words from this:
<query>
<near slop= "10" >
<first end= "4" > exist </first>
<term> database </term>
</query>
• The bool element allows you to combine the other elements into a Boolean
expression. For this, all elements accept an occur = "must" | "should" |
"not" attribute:
Search WWH ::




Custom Search