unit (advanced conjunction operator)
The unit operator retrieves documents that contain all specified words within the same XML unit.
The unit operator is specified with the
<unit>
element:
- Search terms are defined as children of
<unit>
. - The
NAME
attribute lets you specify the name of the unit within which the words must be found. - The unit must be defined in the Index Definition document.
This sample query retrieves documents that contain the words Paris and spring, providing that both words
are within the same paragraph (the <p>
element in
this case having previously been defined as a unit named Paragraphs
). If you had defined a Sentence unit instead of a Paragraphs unit,
this query would find the same values only where they appear within the same sentence.
<?xml version="1.0" encoding="utf-16"?>
<!-- unitQuery.xml -->
<query VERSION="4.5" RESULTSPACE="unitQuery">
<key NAME="FullText">
<unit NAME="Paragraphs">
<elem>Paris</elem>
<elem>spring</elem>
</unit>
</key>
</query>
All sample queries are located in your Program Files directory for TEXTML Server: [...]\IxiaSoft\TextmlServer[version]\SDK\Queries\*.xml.