Create a word or string index definition

You can create a word or string index definition.

Word index definitions are used to identify the elements whose words will be indexed.

String index definitions are used to identify phrases (for example, "Ixiasoft Technologies") that will be indexed.

To create a word or string index definition:

  1. Open the Index Definition document.
  2. Under the root element <indexdefinition>, add an <indexes> element, which will hold each defined index.
  3. Under <indexes>, add an <index> element, and give it a unique name:
    <indexes>
       <index NAME="Headline">
  4. Optionally, create an <admindescription> element to describe the index:
    <indexes>
       <index NAME="Headline">
          <admindescription>Article headlines</admindescription>
  5. Specify the type of index you are defining, <wordindex> or <stringindex>:
    <wordindex>
    </wordindex>
  6. 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. For example, this instructs to search <hedline> elements.
    <elements>
       <element XPATH="//hedline"> 
    Tip: It can be significantly less labor intensive to define index terms by element rather than by specific words or strings. For example, you could use the <p> element to search all paragraphs of your XML documents, rather than attempt to define every word that could be contained in paragraphs.
  7. If necessary, repeat Step 6 to add additional elements that belong in the same index:
    <element XPATH="//subhead">
  8. For each element, enter a DEPTH attribute from 0 to INFINITE to indicate the number of nested sub-elements that will be included in searches.
       <elements> 
          <element XPATH="//hedline" DEPTH="INFINITE"></element>
          <element XPATH="//subhead" DEPTH="INFINITE"></element>
       </elements> 
    </wordindex>