Custom Indexing Modes


You can define a custom indexing mode by specifying metaparameter modifiers in a style.plc file.

Metaparameter modifiers in the style.plc File

The style.plc file has a number of metaparameter modifiers which are used to define indexing modes. These modifiers are a convenient way of setting a number of low-level parameters all at once. Given one metaparameter, the Verity engine calculates appropriate values for a number of low-level parameters. Using metaparameters, system performance can be tuned easily.

The metaparameter modifiers are provided below.

Metaparameter modifier
Description
/inherit
Inherits settings from another mode, either one of the built-in modes, or another user-defined mode. Typically, a new named mode inherits a majority of its settings from another mode, then modifies one or two. Default is to inherit the setting from the generic mode.
/typical_document_size
A best-guess expression of the typical or average number of indexable text words in the documents you will be submitting. Default is 2000 words.
/document_throughput
A best-guess expression of how many documents per hour will be added or updated in the collection. Default is 60 documents per hour.
/document_latency
The acceptable latency, in seconds, between the time that the document submitted to the collection and the time that it can be retrieved with a search. The minimum latency is 15 seconds. Default is 200 seconds.

Defining a Custom Mode

Because you cannot modify any of the predefined indexing modes, you must define your own indexing mode in a style.plc file. A custom mode is defined in a style.plc file by specifying a mode name and metaparameter modifiers. The name you specify must be unique.

As a shortcut, you can use the /inherit modifier to inherit the metaparameters from one of the predefined modes. Then, you can optionally override individual metaparameters.

Defining a Default Indexing Mode

The Verity engine has a mode called default that it uses if an application does not set the indexing mode using mkvdk or the VDK API. The following example defines the default mode as the bulkload mode.


$control: 1
policy:
{
mode: default
/inherit=bulkload
}
$$
NOTE: You must use the mode name of default. However, you can specify any predefined mode as the basis, using the /inherit modifier, and you can also override any of the inherited mode's metaparameters by specifying your own values.

Inheriting From a Predefined Indexing Mode

In this example, you want to define a new mode, called mymode, that inherits all metaparameters of bulkload with an override of typical_document_size=1000.


$control: 1
policy:
{
mode: mymode
/inherit=bulkload
/typical_document_size=1000
}
$$

Defining Multiple Custom Indexing Modes

You can define multiple modes by repeating the mode: name entry with any relevant metaparameter modifiers. For example:


$control: 1
policy:
{
mode: mymode
/inherit=bulkload
mode: myothermode
/inherit=bulkload
/typical_document_size=1000
}
$$




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