Create a numeric index definition

Numeric index definitions define how the TEXTML Server engine will interpret and index integers and decimal numeric values in XML documents.

Note: To access the index DTD, see Retrieve all system documents for a docbase.

To create a numeric index definition:

  1. Open the Index Definition document for the docbase.
  2. Under <indexes> add a new <index> element, and give it a name.
  3. Specify the index type as numeric:
    <index NAME="Word Count">
       <numericindex>
       </numericindex>
    </index>
  4. Optionally, add an <admindescription> element to describe the numeric index:
    <index NAME="Word Count">
       <admindescription>Word count for an article</admindescription>
       <numericindex>
       </numericindex>
    </index>
  5. Add an XPATH element to hold the list of XML elements whose content you want indexed.
    The XPATH attribute provides the exact element name used, preceded by two slashes. In the example below, TEXTML Server is instructed to search the <item-length> element within <pubdata>:
    <elements>
       <element XPATH="//pubdata/@item-length" DEPTH="INFINITE"></element>
    </elements>
    Tip: The DEPTH attribute is used to specify the number of child elements indexed. A DEPTH of 0 means the content of the element itself is indexed; 1 means the content and its immediate child are indexed, and so on. INFINITE means that all child elements must be indexed. If you do not specify a depth, the default INFINITE value is implied.
  6. Repeat Step 5 to add additional elements if desired.
  7. You can use the numeric index definition as is, or do one of the following: