Create a date index definition

Date index definitions are used to identify the elements that will be searched for date metadata in your docbase documents, and to specify the date format standard and the pattern used (dd-mm-yyyy for example).

To create a date index definition:

  1. Open the Index Definition document for the docbase using a text editor or the TEXTML Server Administration Console. (See Open the Index Definition document for a docbase).
  2. Under the <indexes> element, add a new date index, and give it a unique name:
    <index NAME="Publication Dates"> 
    </index>
  3. Optionally, add an <admindescription> element to describe the date index:
    <index NAME="Publication Dates">
       <admindescription>Publication dates, using YYYY-MMM-DD format.</admindescription>
    </index>
  4. Specify the type of index you are defining, <dateindex>.
    <index NAME="Publication Dates">
       <admindescription>
          Publication dates, using YYYY-MMM-DD format.
       </admindescription>
       <dateindex>
       </dateindex>
    </index>
  5. Create a <dateindexproperties> element:
    <index NAME="Publication Dates">
       <admindescription>
          Publication dates, using YYYY-MMM-DD format.
       </admindescription>
       <dateindex>
          <dateindexproperties>
          </dateindexproperties>
       </dateindex>
    </index>
  6. To specify validation rules, add a <datevalidation> element. Possible values are as follows:
    • YearMonthDay: TEXTML Server indexes dates provided they contain the year, the month, and the day.
    • YearMonth: TEXTML Server indexes dates provided they contain the year and the month.
    • Year: TEXTML Server indexes dates provided they contain a year.
    <dateindexproperties>  
       <datevalidation VALUE="YearMonthDay"/> 
    </dateindexproperties>
  7. To specify the date format that TEXTML Server will search for, add a <formats> element, and provide its name, using a format from the DATETIME_FORMATS.XML document:
    <index NAME="Publication Dates">
       <admindescription>
          Publication dates, using YYYY-MMM-DD format.
       </admindescription>
       <dateindex>
          <dateindexproperties>
             <formats>
                <format NAME="ISO 8601"/>
             </formats>
          </dateindexproperties>
       </dateindex>
    </index>
    Note: ISO 8601 (see example above) is an international standard that uses a four-digit year format, thereby eliminating confusion that can arise with two-digit year formats. The DATETIME_FORMATS.XML document is available by running the Advanced v4 query from within the TEXTML Server Administration Console. Although the <formats> element is optional, it is recommended, since if you do not specify the format dates may be interpreted inconsistently.
    Note: If your docbase documents use a two-digit year format, add a TWODIGITYEARSTART attribute to indicate the century to which the digits will be attributed. For example, the default value, 1951, means that digits above 51 will be attributed to the 1900's, and those below will be interpreted as the 21st century. Using this rule, the year "45" would be interpreted as "2045" while "66" would be interpreted as "1966".
  8. Add an XPATH attribute to hold the list of XML elements whose content you want indexed.
    The XPATH attribute in the example below selects the date.publication attribute from within any <pubdata> elements in a document.
    <dateindex>
       <elements>
          <element XPATH="//pubdata//@date.publication"> 
       ...
    </dateindex>