style.ufl File Syntax


The style.ufl file syntax is also valid for the style.ddd file. You should only edit the style.ufl to add custom fields, or the style.sfl file to comment or uncomment standard fields. Do not edit the style.ddd file unless directed by Verity technical support or sales engineering staff.

Note that delimiters (curly braces) surround the field definitions associated with a data-table statement.

Mandatory Statements

$control

The $control statement appears on the first non-comment line in a style.ufl file. This statement identifies the file as a Verity control file, and it always appears as $control: 1.

$control Syntax

$control: 1

descriptor

The descriptor statement identifies the file as a document dataset descriptor file. The descriptor statement must be followed by a /collection = yes modifier.

description Syntax

The descriptor statement appears as the first statement after the $control statement in a style.ddd/style.sfl/style.ufl file.


descriptor:
/collection = yes
Element
Description
descriptor:
This is a required statement that does not take an argument. A descriptor statement can be followed by one or more data-table statements.
/collection = yes
This modifier identifies this file as a collection descriptor file to be used by the Verity engine.

data-table

The data-table statement identifies a data table of fields to be included in the collection. A collection can include one or more data tables.

Multiple data-table statements can be specified in the style.ufl file.

data-table Syntax

The data-table statement is a child of the descriptor statement.


descriptor:
{
data-table: name
Element
Description
data-table:
This statement identifies the name of the data table.
name
This argument is a unique three-character name assigned to a data segment. Segment names including underscores (_) are reserved for use by Verity. Segment names must be unique within a collection.

NOTE: Segment names should not contain the same three-characters as style file extensions.

Using data-table Statements

When indexing documents for a collection, the Verity engine creates data segments based on the syntax provided in a style.ddd file and style.ufl file. If the files have one data table defined, only one data segment is produced for each partition in the collection; if two data tables are defined, two data segments are produced. Each collection's document data table contains one or more field definitions depending again on the syntax of the style.ddd file and its included style.ufl file used to create the collection.

For a fixed-width or variable-width field, the application developer can elect to store a single field in its own data segment. Storing these types of fields in separate data segments improves their accessibility to the Verity search engine, and can result in improved retrieval performance time. Searching will be faster; display of results slower.

To store a field in its own data segment, use a construct similar to the following:


data-table: name
{
varwidth: fieldname identifier
}

Constant Field Types

constant

The constant field type for a data-table statement identifies a field that assumes a constant value for every document in the collection. An application reads a constant field from the collection's documents table at run time. The field value assigned to a constant field is always the same for all documents in the collection using the same style.

constant Syntax

The constant field type is defined in a data-table statement, and the syntax of the constant field type is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
constant: fieldname data_type value
}
Element
Description
fieldname
This required argument is the field name for the constant field. The name can have a maximum of 128 characters, consisting of alphanumeric characters. Field names including underscores (_) are reserved for Verity.
data_type
This required argument identifies the type of data to be stored in the constant field type.

The table of valid data types can be found in the section,
"Data Types," earlier in this chapter.
value
This required argument identifies the value assigned to the constant field. If the value specified contains white space, then it must be enclosed in quotation marks.

autoval

The autoval field type for the data-table statement identifies a field that automatically assumes a constant value for every document in a collection. This field is referred to as an automatic value field because the Verity engine automatically computes the field value from the autoval keyword in the style.ddd file at run time.

NOTE: This field type is used internally by the Verity engine and should only be used at the direction of Verity technical support.

The constant value assigned to an automatic value field can fluctuate by collection. For example, if the name of one collection is march02, and the name of another collection is april02, document fields in the first collection and the second collection are assigned different values.

autoval Syntax

The autoval field type is defined in a data-table statement, and the syntax of the autoval field type is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
autoval: fieldname DBNAME|DBPATH|SIRENAME|SIREPATH
}
Element
Description
fieldname
This argument is the field name for the automatic value field. The field name can have a maximum of 128 characters, consisting of alphanumeric characters. Field names including underscores (_) are reserved for Verity.
DBNAME
The name of the collection that stores information to make documents retrievable. When DBNAME is specified, the name of the collection is assigned as the value of the autoval field.
DBPATH
The full or relative pathname of the collection. When DBPATH is specified, the pathname of the collection associated with a document is assigned as the autoval field value.
SIRENAME
The name of the style.ddd file used to create the collection. When SIRENAME is specified, the name of the style.ddd file associated with a document is assigned as the autoval field value.
SIREPATH
The full or relative pathname of the style.ddd file. When SIREPATH is specified, the pathname of the style.ddd file associated with a document is assigned as the autoval field value.

worm

The worm keyword for a data-table statement identifies a field that assumes a constant value for every document in a collection. The field is referred to as a worm field because functionally the Verity engine writes the value once to the collection's documents and reads the value many times (Write Once Read Many).

NOTE: This field type is used internally by the Verity engine and should only be used at the direction of Verity technical support.

worm Syntax

The worm field type is defined in a data-table statement, and the syntax of the worm field type is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
worm: fieldname data_type
}
Element
Description
fieldname
This argument is the name of the worm field. The name can have a maximum of 128 characters, consisting of alphanumeric characters. The name cannot begin with an underscore.
data_type
This required argument identifies the type of data to be stored in the worm field type.

The table of valid data types can be found in the section,
"Data Types," earlier in this chapter.

Variable Field Types

fixwidth

The fixwidth field type for a data-table statement identifies a fixed-width field. The application developer may elect to store fixed-width field definitions in separate data tables to improve retrieval performance. Refer to "Using data-table Statements" for information about storing variable-width field definitions in separate data segments.

NOTE: A data-table segment cannot have more than 1023 fixwidth field entries.

fixwidth Syntax

The fixwidth field type is defined in a data-table statement, and the syntax of the fixwidth field type is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
fixwidth: fieldname length data_type
/indexed = yes|no
/case-sensitive = yes|no
}
Element
Description
fieldname
This argument is the name of the fixed-width field. The name can have a maximum of 128 characters, consisting of alphanumeric characters. Note that the name cannot begin with an underscore.
length
This required argument identifies the length of the fixed-width field expressed as a number of characters.
data_type
This required argument identifies the type of data to be stored in the fixwidth field.

The table of valid data types can be found in the section,
"Data Types," earlier in this chapter.
Element
Description
/indexed
This optional modifier identifies whether the Verity engine creates an index for this field. By default, an index is not created. If you enter /indexed=yes, an index is created.
/case-sensitive
This optional modifier identifies whether the Verity engine creates a case-sensitive index if an index is created for this field. By default, an index is not case-sensitive. If you enter /case-sensitive=yes, a case-sensitive index is created.

fixwidth Length and Ranges for Integer Data Types

The following table lists the range for each integer type (unsigned and signed) based on field length.

Length(bytes)
Unsigned-Integer Range
Signed-Integer Range
1
0 to 255
-128 to 127
2
0 to 65535
-32768 to 32767
4
0 to (232-1)
-231 to (231-1)

varwidth

The varwidth field type for a data-table statement identifies a variable-width field. The application developer may elect to store variable-width field definitions in separate data tables to improve retrieval performance. Refer to "Using data-table Statements" for information about storing variable-width field definitions in separate data segments.

varwidth Syntax

The varwidth field type is defined in a data-table statement, and the syntax of the varwidth field type is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
varwidth: fieldname identifier
/indexed = yes|no
/case-sensitive = yes|no
}
Element
Description
fieldname
This argument is the name of the variable-width field. The name can have a maximum of 128 characters, consisting of alphanumeric characters. Note that the name cannot begin with an underscore.
identifiert
This required argument identifies a three-character name for the data segment that will store all variable-width field definitions. The segment name should begin with the letters dd. The specified name cannot begin with an underscore (_) or the letter combination di.
Element
Description
/indexed
This optional modifier identifies whether the Verity engine creates an index for this field. By default, an index is not created. If you enter /indexed=yes, an index is created.
/case-sensitive
This optional modifier identifies whether the Verity engine creates a case-sensitive index for the field if the field will be indexed. By default, an index is not case-sensitive. If you enter /case-sensitive=yes, a case-sensitive index is created.

dispatch

A document dispatch field, defined by a dispatch field type, represents free-form text that will be searched and presented for viewing. It points to the document text in place, without copying the text into the collection. By default, the document dispatch field is named DOC.

The dispatch field identifies a special field referred to as the document dispatch field. In most cases, a collection has only one document dispatch field that stores information about a document's location and size. This information is used to dispatch the document when the application issues a command to display it. The dispatch field is defined in the default style.ddd file. It is recommended that this field definition remain in the style.ddd file, not in one of the include files.

dispatch Syntax

The dispatch field is defined in a data-table statement in the style.ddd file, and the syntax of the dispatch field is shown below. For a description of name, see "data-table Syntax" in the "data-table" section.


data-table: name
{
dispatch: fieldname
}
Element
Description
dispatch:
This identifies the field type as a document dispatch field.
fieldname
This argument is the name of the dispatch field. The default style.ddd file assigns the name "DOC" to the document dispatch field.

Assigning a Custom Name to a Dispatch Field

If you want to assign a name other than DOC, then you must create a separate data table for a variable-width field having the same root name as the document dispatch field.

NOTE: Place the data-table segment in the style.ufl file, which is accessed from a $include statement in the style.xfl file, which is in turn accessed from a $include statement in the style.ddd file. For example, if you want to name the document dispatch field article, then the syntax of the style.ufl file would need to include the following syntax:


data-table: ddf
{
varwidth: article_fn dd1
dispatch: article
}
The variable-width field for the document's file name must have the same root name as the dispatch field, and the variable-width field must have the _fn ending.

If a custom dispatch field name is used (only if your are creating a second dispatch field), you must define a style.dft file that minimally includes the field keyword with the custom dispatch field name. For example, for a dispatch field named article, the following statement must appear in the style.dft file:

field: article

For complete information about the style.dft file, refer to Chapter 6, "Document Filters and Formatting."





Copyright © 2002, Verity, Inc. All rights reserved.