Defining properties for date indexes

When you define properties for your date indexes you indicate TEXTML Server how to interpret the dates encountered in the documents. Doing so, you ensure that the dates are stored properly and therefore you ensure the accuracy of the searches.

If you do not define date properties, that is if you let the <dateindexproperties> and/or the <element> element empty, TEXTML Server uses a default definition to recognize and index dates.

For conceptual information about date indexes and properties, refer to the TEXTML Server Administration Guide.

To define properties for a date index:

  1. In the Index Definition document, locate the <dateindexproperties> element.
  2. If you want to specify validation rules, under <dateindexproperties> add a <datevalidation> element. Specify the value for the element’s attribute VALUE:
    • YearMonthDay: TEXTML Server recognizes and indexes dates that contain the year, the month, and the day. It ignores all dates that do not contain the three parts.
    • YearMonth: TEXTML Server recognizes and indexes dates that contain at least the year and the month. It ignores all dates that do not contain at least the two parts.
    • Year: TEXTML Server recognizes and indexes dates that contain at least the year. It ignores all dates that do not contain at least the year.
    <dateindexproperties>  
       <datevalidation VALUE="YearMonth"/> 
    </dateindexproperties>
  3. If you want to define date formats, add a <formats> element and as many <format> child elements as formats you want to specify, under <dateindexproperties> if you want to define properties for the whole index, and/or under <element> if you want to define properties for a specific element.
    1. Specify the name of the format as value to the <format> element’s attribute NAME.
      All formats are listed in the DATETIME_FORMATS.XML document located in TEXTML Server’s Documentation folder.
      <dateindexproperties> 
         <formats> 
            <format NAME="en_US"/> 
            <format NAME="fr_FR"/> 
         </formats> 
      </dateindexproperties>
    2. Specify the turning point date as value to the <format> element’s attribute TWODIGITSYEARSTART otherwise the default turning point year 1951 applies.
      <dateindexproperties> 
         <formats> 
            <format NAME="en_US" TWODIGITSYEARSTART="1930"/> 
            <format NAME="fr_FR" TWODIGITSYEARSTART="1930"/> 
         </formats> 
      </dateindexproperties>