The k2server.ini parameter reference

The K2 Server configuration file, k2server.ini, contains many sections. The first section, [server], provides parameters that control the behavior of the entire server. Each subsequent collection section (in the form [Coll-1], [Coll-2], and so on) controls each collection and search service configured for the server.

Server section

The following table describes the parameters that you can use in the server section of the server configuration file. The K2 Server executable includes a sample configuration file (k2server.ini).

Parameter
Description
serverAlias
An arbitrary name used to identify the server.
numThreads
The default number of search threads to be started in the server process. If too many threads exist, the system can run out of memory; if too few threads exist, searches will be blocked and forced to wait for a Verity engine thread to become available. The value of numThreads is based on hardware resources and system needs.
maxFiles
The maximum number of file handles that can be opened by a specific search thread. The default value for maxFiles is dependent on the limits of the OS used. The maxFiles value affects how file handles are shared between the operating system and the search engine. The maxFiles and numThreads values together can be used to tune system performance.
The following values can be set for a server:
[server]
numThreads=4
maxFiles=100
These entries for a K2 Server cause the system to support a maximum of 4 concurrent searches, with 100 file handles allocated for each search thread. The search engine determines default values per operating system. For large or fragmented collections, Macromedia recommends that you explicitly set a value for maxFiles.
portNo
The TCP port number for client connections. The value of portNo is the same value assigned to portNo in the k2broker.ini file that identifies the broker referring to this server.
numListeners
The maximum number of clients that can connect to the server at one time. The numListeners value must be equal to or greater than the sum of all numThreads values specified by all K2 Brokers in the K2 search system. The numThreads value is set for a K2 Broker in the k2broker.ini file.
broker(n)
The brokers to ping on startup. Multiple brokers can be specified. For example:
broker(1)=machinea:9900
broker(2)=machineb:9901
maxColSize
The maximum width of the fields to return to the results list, in bytes. The default is 2048 bytes.

Search thread keywords

The following table describes keywords that you can use in your search threads:

Keyword
Description
vdkHome
The directory containing Verity resources.
vdkSortingFlag
A flag indicating whether the Verity engine sorts at the collection level. Valid values include:
  • NO, False, or 0  Do not perform sorting at the collection level (default)
  • YES, True, or 1  Perform sorting at the collection level.
To implement sorting at the collection level, you must set vdkSortingFlag to YES in the k2server.ini file (in the server section) and the k2broker.ini file (in the broker section).
sortTruncDocs
The maximum number of documents to consider when sorting.
accessProfile
The Security Access Profile specified in the form of a query expression. The security access profile represents the access question that a document must pass in order for users to have access to it.
topicSet
The default pathname to a directory for the default topic set, which is an indexed set of topics. The value of the topicSet parameter identifies the default topic set to make available by every search service to clients at startup .
knowledgeBase
The default pathname to a knowledgeBase map file, which identifies numerous topic sets (indexed topics). The value of the knowledgeBase parameter identifies the topic sets (multiple) to make available to clients for every search service at startup).
charMap
A string that names the character set to use for strings that are sent to the server and enerated by the server. This string must match the name of a .cs file in the root of the common directory that configures a character set and its mappings. For example, if your application uses character set 8859 for all of its interactions with the server, then set this charMap parameter to the string 8859. Valid values include, but are not limited to, the character sets supplied by Verity: 850 (default) for code page 850; 8859 for code page 8859.
locale
The name of the locale (combination of language, dialect, and character set) to use for all internal Verity engine operations. This name must correspond to a subdirectory in the common directory where the configuration file for the locale is found and where the message database and other locale-specific files are located. Leaving this parameter null means that the server uses the default internal locale, which is "english" written in the "850" character set.
resultCacheTimeout
The timeout in milliseconds for the result cache. The timeout occurs after 60 seconds or when the cache overflows based on resultCacheQuota.
resultCacheQuota
The number of slots per segment for the result cache. The result cache is composed of 16 segments, each of which has a number of slots for caching items : K2SearchNew, K2SearchRecv, K2DocReadBatch. The timeout occurs after resultCacheQuota value * 16.
If resultCacheQuota=10, each of the segments has 10 slots. Since a search operation involves a call to K2SearchNew and a call to K2SearchRecv, an additional slot is used.
resultCacheEnabled
A flag indicating whether the result cache is enabled. Valid values include:
  • Yes, True, or 1  Enables the result cache.
  • No, False, or 0  Disables the result cache (default).
By default, the cache is not enabled.
resultCacheMaxInBytes
Amount of memory, in bytes, to use for the cache.

Collection sections

The K2 Server initializes a separate search service for each collection that you identify in the server configuration file. To add one or more collections to the configuration file, enter a separate block of keywords for each collection, in the following format:

[Coll-n]
collPath=<pathname>
collAlias=<value>
topicSet=<topicset>
knowledgeBase=<knowledgeBase>
numThreads=<value>
maxFiles=<value>
onLine=<value>
maxColSize=<value>
locale=<language>
charMap=<charmap>
inputDateFormat=<format>

Increment the block label for each collection that you configure, starting with Coll-0. The following table describes the keywords used to configure each collection and search service:

Keyword
Description
collPath
The pathname identifying the collection home directory.
collAlias
An arbitrary name used to identify the collection.
topicSet
The pathname to a directory for the default topic set, which is an indexed set of topics. The value of the topicSet parameter identifies the default topic set to make available to clients by every search service at startup. If not specified, the value of topicSet from the server section is used.
knowledgeBase
The pathname to a knowledgeBase map file, which identifies numerous topic sets (indexed topics). The value of the knowledgeBase parameter identifies the topic sets (multiple) to make available to clients for every search service at startup. If not specified, the value of the knowledgeBase parameter from the [server] section is used.
numThreads
The number of concurrent searches for the collection. If not specified, the value of numThreads from the [server] section is used.
maxFiles
The maximum number of files that can be opened by a specific search thread for a collection. If not specified, the value of the maxFiles parameter from the server section is used. The maxfiles and numThreads values together can be used to tune system performance. The following values can be set for a collection:
[Coll-0]
numThreads=4
maxFiles=100
These entries for collection 0 cause K2 Server to support a maximum of 4 concurrent searches, with 100 file handles allocated for each search thread.
onLine
A flag indicating whether the server starts up with the collection on-line. Valid values include:
  • 0  Start the server with the collection offline
  • 1  Start the server with the collection in a hidden state
  • 2  Start the server with the collection online (default).
In the hidden state, collections can be primed and tested, but are not yet available for searching by users. When collections are set offline, any queries currently running complete using these resources; subsequent queries do not see the resource.
maxColSize
The maximum width of the fields to return to the results list, in bytes. If not specified, the value of maxColSize from the server section is used.
locale
The name of the locale (combination of language, dialect, and character set) to use for all internal Verity engine operations. This name must correspond to a subdirectory in the common directory where the configuration file for the locale is found and where the message database and other locale-specific files are located. If not specified, the value of the locale parameter from the server section is used.
charMap
A string that names the character set to use for strings that are sent into the server and generated by the server. This string must match the name of a .cs file in the root of the common directory that configures a character set and its mappings. If not specified, the value of the charMap parameter from the server section is used.
For example, if your application uses character set 8859 for all of its interactions with the server, set this charMap parameter to the string 8859. Valid values include, but are not limited to, the character sets supplied by Verity: 850 (default) for code page 850; 8859 for code page 8859
inputDateFormat
The input date format to be used. If there is no specified value for the inputDateFormat parameter, the default is MDY (Month-Day-Year), a numeric format.

Comments