Creating time indexes

You create time indexes in the Index Definition document. To be able to do so, you must check the Index Definition document out and save it on your hard drive.

Time indexes index the whole content of XML elements or attributes that contain times.

To ensure that the indexing engine recognizes times accurately, you can specify time formats.

All formats are listed in the DATETIME_FORMATS.XML document located in TEXTML Server’s default repository, as a system document.

For conceptual information on time indexes, refer to the TEXTML Server Administration Guide.

To create a time index:

  1. Open the Index Definition document with any XML editor.
  2. Under the root element <indexdefinition> add an <indexes> element, which will hold each defined index.
  3. Under <indexes> add an <index> element, which represents one index. Specify the name of the index in the NAME attribute of <index>.
  4. Under <index> specify the type of index you are defining. To define a time index add a <timeindex> element. You may add an <admindescription> element to enter a description for your index.
  5. Under <timeindex> add a <timeindexproperties> element to specify time formats.
    See Defining Properties For time Indexes on page33 to define time index properties.
  6. Under <timeindex> add an <elements> element to hold the list of elements whose content you want indexed.
  7. Under <elements> add an <element> element, which represents one XML element of your documents whose content you want indexed. Specify the name of the element as value for the NAME attribute of <element>.
    You may add as many <element> elements as XML elements you want indexed.
    1. Specify the XPath of the element as value to the XPATH attribute of <element>.
    2. You may specify an integer or INFINITE as value to the DEPTH attribute to specify to which extend the content must be indexed.
      0 means the content of the element itself is indexed, his children are ignored. 1 means the content of the element and its immediate child are indexed. 2 refers to the next level of child elements, and so on. INFINITE means that the content of all children of the element must be indexed. If you do not specify a depth, the default INFINITE value is implied.
         <element XPATH="//experiment/starttime" DEPTH="0"/> 
         <element XPATH="//experiment/endtime" DEPTH="0"/> 
  8. If you want to add time properties for a specific element only, add a <formats> element under <element>.