Greg's Blog

helping me remember what I figure out

Cold Fusion 5 - Verity 2K

| Comments

As of CF5.0, the engine shipped with the application server is Verity 2K. By default this engine is not enabled and thus the application server still makes use of the VDK (Verity Developer Kit).

To improve performance and take advantage of it?s ability to index more document types (such as PDFs) it is highly recommended to switch to Verity 2K mode. However this is services is not enabled and requires manual configuration and starting (read edit a .ini file and start the service).

Some limitations of Verity are:

  • Enterprise level restricted to searching 250,000 documents, Pro has half that capacity.
  • Collections need to be manually specified in the .ini file.
  • Manual start of the server (whn not run as a service, still needs to be initialised manually though to run as a service)
  • Restricted to interact with only 1 K2server (need to upgrade to make use of the broker service)

So step 1 is to find the k2server.ini file and edit it:

Location of k2server.ini file = c:\cfusion\verity\\bin\, even though the documentation would indicate that it’s located in c:\cfusion\bin - this is not the case.

It’s default settings are:

## portNo: TCP port number for client connections.
portNo=9901

## Each Collection section controls each collection
## and search service configured for the server
##
## Collection Path Examples:
## Assume there is the collection called “myCollection”
## created by ColdFusion.
##
## The following [coll-0] and [coll-1] collection sections
## register the collections created by ColdFusion.
##
## The “collAlias” entry is the collection alias name
## which is the collection name used by CFSEARCH CFML tag.
## (i.e. “myCollection_file” and “myCollection_custom”)
##
## Make sure that the CFSEARCH tag parameter “external” is set to “No”
## and that the collection alias name is unique and not the same
## as any existing collection names managed by ColdFusion.
##

##[Coll-0]
##collPath=c:\cfusion\verity\collections\mycollection\file
##collAlias=myCollection_file
##topicSet=
##knowledgeBase=
##onLine=2

##[Coll-1]
##collPath=c:\cfusion\verity\collections\mycollection\custom
##collAlias=myCollection_custom
##topicSet=
##knowledgeBase=
##onLine=2

The only thing I changed for my local test was to create a collection. This was going to be aptly named: myCollection

[Coll-0]
collPath=c:\cfusion\verity\collections\myCollection
collAlias=myCollection
topicSet=
knowledgeBase=
onLine=2

Since there were no instructions on whether or not to create the folders I referenced here I didn’t do it and proceeded to start the Verity 2k server. Again the documentation is slightly off for Windows as the executable for my installation was located in the same folder as my .ini file. So go to the command prompt and type in the following command:

2kserver iniFile 2kserver.ini

Now I am not too keen on manually starting processes, so I decided to make use of service configuration option.

k2server -iniFile k2server.ini -ntService 1

And this is the output to be displayed

K2SERVER - Verity, Inc. Version 2.20pr6

k2server Created
Starting k2server Now…
k2server Started

Now of course it’s easy to stop and start the service through your usual techniques from the command line the stop/start commands would look as follows:

net stop “k2server”
net start “k2server”

Now all we need to is tell the Cold Fusion Administrator that a 2kserver is running and you do that by logging on and specifying the server name and port number after selecting the “Verity server” option from the menu (it’s under Data Sources). In my case it was localhost as it was my dev machine and 9901 for the port number (taken from the 2kserver.ini file).

OK so far so good, the server is running, Cold Fusion knows about it’s existence, next time we’ll look into testing the installation.