Defining Document Fields

With document fields the Verity module makes a distinction between standard and user-defined fields. Standard fields are configured in the style.sfl file, user-defined ones in style.ufl . If you wish to define fields in order to provide for additional information concerning your documents in the search result, please take notice of the following:

  • Each field increases the amount of memory needed in proportion to the number of indexed documents.
  • Field values are set during the indexing process and can be included in the search result during a search.The more fields you have defined or are included in the search result the longer this process will take.

The names of the standard document fields are defaults of the Verity module which you should not change to keep your collections compatible with third party collections. However, you can define alias names for document fields instead, if required.

The format of the style.sfl and style.ufl files is identical. The Verity module reads them in via the style.ddd file. Fields in these files can be defined in accordance with the following example:

data-table: nps{    
    varwidth: objId       dda       
    /minmax = yes
    /alias = objectId    
    autoval:  collection  DBNAME}

The keyword data-table serves to define the name of a table in a data segment for the Verity module. In the example above, the name is nps.

With each field a storage type is associated which determines the source of the field value and how it is stored. The following storage types exist:

Storage type Meaning and usage
autoval Assigns an internal value of the Verity module to the field.
Syntax: autoval: FieldName DBNAME|DBPATH
FieldName: Name of the field.
DBNAME: Collection name.
DBPATH: Path of the collection.
constant Assigns a constant value to the field.
Syntax: constant: FieldName DataType Value
FieldName: Name of the field.
DataType: One of the data types listed below.
Value: The field value. Must be enclosed in quotes if it contains space characters.
worm Assigns a value from a document zone to a field. The value cannot be changed afterwards (write once, read many times).
Syntax: worm: FieldName DataType
FieldName: Name of the field.
DataType: One of the data types listed below.
fixwidth Assigns a value from a document zone to a field. The value has a fixed length and will be truncated if necessary.
Syntax: fixwidth: FieldName Length DataType
FieldName: Name of the field.
Length: The maximum length of the field value in characters.
DataType: One of the data types listed below.
Modifier: /minmax = yes|no: Speeds up searches in the values of this field, especially with larger collections and if the field values lie within a particular range.
varwidth Assigns a value from a document zone with any length to a field.
Syntax: varwidth: FieldName StorageLocation
FieldName: Name of the field.
StorageLocation: A three-character string which must not start with _ or di.
Modifier: /minmax = yes|no: see fixwidth.

Field names can consist of up to 128 alphanumeric characters and must not begin with an underscore character. As storage location for the varwidth storage type, specify dda, for example.

Every document field can have one of the following data types:

Data type Meaning
text The field contains ASCII characters.
date An internal date format used to store date and time values in the range from 1904 to 2037. This data type is not compatible with the date and time format of the Search Cartridge.
signed-integer A signed integer number whose range depends on the size of the field.
1 Byte: -128 to 127
2 Bytes: -32768 to 32767
4 Bytes: -2e31 to 2e31 -1
unsigned-integer An unsigned integer number whose range depends on the size of the field.
1 Byte: 0 to 255
2 Bytes: 0 to 65535
4 Bytes: 0 to 2e32 -1

Document fields that have been created using the minmax option allow for storing up to 256 bytes in them. If the size of the value to be stored is greater, then only the first 256 Bytes are stored in the field. By means of the alias option an alternate name can be specified under which the field can be addressed in search queries.