Editing the k2server.ini File

To enable a collection for searching using K2 Server, you need to first set up the k2server.ini file. On Windows platforms, k2server.ini can be found in: cfusion\bin. On UNIX, k2server.ini can be found in: opt/coldfusion/verity/<platform>/bin.

The k2server.ini file consists of a large number of parameters you probably won't need to change. To get started quickly focus on the following sections in the k2server.ini file:

In the file listing for k2server.ini, the collection section can be found between lines 66-78.

For complete details on k2server.ini parameters, refer to "k2server.ini Parameter Reference".

Edit the vdkHome parameter of k2server.ini

The value of the vdkHome parameter in k2server.ini should be the directory where your Verity files are installed.

Edit the Coll-n section of k2server.ini

In the Col-n section of k2server.ini, you need to specify the directory location of the collections you want K2 Server to search in the collPath parameter. This value must point to an existing Verity collection. The k2server executable can't be used to create a collection.

For example, the collPath value points to the collection created for ColdFusion once you have first indexed the ColdFusion online documentation (this collection is not created at setup time):

[Coll-0]

collPath=c:\cfusion\verity\collections\cfdocumentation\custom

collAlias=cfdoc_custom

topicSet=

knowledgeBase=

onLine=2

Create a Coll-n section for each collection you want to search with K2 server, incrementing the value n by one for each entry.

k2server.ini file listing

Here's an example of the k2server.ini file for Windows platforms. Line numbers are included for reference.

1  ## This is an example of a K2 Server ini file used with ColdFusion.

2  ##

3  ## This Server section provides keywords that control

4  ## the behavior of the entire server.

5

6  [Server]

7

8  ##

9  ## numThreads: number of Vdk search threads 

10 ## started in this server process. If there are too 

11 ## many, the system can run out of memory, if two 

12 ## few, searches will be blocked waiting for a Vdk 

13 ## thread to become free. The number is based of 

14 ## hardware resources and system needs.

15 numThreads=5

16

17 ## maxFiles: K2 Search Engine determines default values

18 ## per OS. For large or fragmented collections, manually

19 ## set this value. If 'numThread=4' and 'maxFiles=100',

20 ## the K2Server causes the system to support a max of 4

21 ## concurrent searches, with 100 file handles for each 

22 ## search thread. 

23 ## maxFiles =

24

25 ## numListeners: maximum number of clients that can 

26 ## connect to the K2 Server at any one time. This value

27 ## must be >= to twice the number of threads specified

28 ## in 'numThreads' values specified for all K2Brokers

29 ## in the K2 Search system ('numThreads' in 'k2broker.ini'

30 ## files multiplied by 2)

31 numListeners=20

32

33 ## portNo: TCP port number for client connections.

34 portNo=9901

35

36 ## vdkHome: directory containing Verity resources

37 vdkHome=c:\cfusion\verity\common

38

39 sortTruncDocs=

40 accessProfile=

41 knowledgeBase=

42 charMap=

43 language=

44 locale=

45

46 ## Each Collection section controls each collection

47 ## and search service configured for the server

48 ##

49 ## Collection Path Examples:

50 ## Assume there is the collection called "myCollection"

51 ## created by ColdFusion.

52 ##

53 ## The following [coll-0] and [coll-1] collection sections

54 ## register the collections created by ColdFusion.

55 ## 

56 ## The "collAlias" entry is the collection alias name

57 ## which is the collection name used by CFSEARCH CFML tag.

58 ## (i.e. "myCollection_file" and "myCollection_custom")

59 ##

60 ## Make sure that the CFSEARCH tag parameter "external" is 

61 ## set to "No"

62 ## and that the collection alias name is unique and not the same

63 ## as any existing collection names managed by ColdFusion.

64 ##

65

66 ##[Coll-0]

67 ##collPath=c:\cfusion\verity\collections\mycollection\file

68 ##collAlias=myCollection_file

69 ##topicSet=

70 ##knowledgeBase=

71 ##onLine=2

72

73 ##[Coll-1]

74 ##collPath=c:\cfusion\verity\collections\mycollection\custom

75 ##collAlias=myCollection_custom

76 ##topicSet=

77 ##knowledgeBase=

78 ##onLine=2



Banner.Novgorod.Ru