Using the rck2 utility to search K2 Server documents

The rck2 command-line utility lets you search collections associated with a K2 Server in a K2 Search System. The rck2.exe file, which starts the rck2 utility, is located in the cf_root\lib\_nti40\bin directory in Windows, and in the cf_root/lib/platform/bin directory in UNIX.

In these pathnames, cf_root refers to the ColdFusion root directory. In Windows, this is typically C:\CFusionMX; in UNIX, this is typically /opt/coldfusionmx. In UNIX, platform refers to the UNIX version of the server that runs ColdFusion: _solaris, _hpux11, or _ilnx21.

rck2 syntax

Use the following syntax to start rck2 from the command line:

rck2 -server <servername> -port <portno>

For example: c:\cfusionmx\lib\_nti40\bin\rck2 -server localhost -port 9901.

The following table describes rck2 syntax elements:

Syntax element
Description
-server <servername>
The server name for K2 Server to which to attach. The server name is defined in the k2server.ini file. The rck2 utility searches the collections attached to this server.
-port <portno>
The port number where K2 Server (specified by -server) is running.

rck2 command options

The following table describes rck2 command options:

rck2 command
Description
p <sortspec>
The sort specification for the search results. By default, results are sorted by Score. Multiple fields must be specified in a space-separated list using asc or desc to indicate ascending or descending order. For example: p score desc title asc
m <maxdocs>
The maximum number of documents to return in the results list.
c <collections>
The list of collections to search. Multiple collections must be specified in a space-separated list. For example: c coll1 coll2 coll3
f <fields>
The list of fields to retrieve. For example: f k2dockey title date
s <query text>
The query (or question) to be used to process the search. The query can be expressed as words and phrases separated by commas. Additionally, the query can include Verity query language, operators and modifiers.
g <collection>
Display collection information.
d <k2dockey>
Display fields for the K2 document key specified.
v <k2dockey>
Stream the document and display it with highlights.
r <docstart>
Display results starting with the first result in the results list. Fields specified using the f command are displayed. Docstart indicates the first result to be displayed. For example, r 10 displays results starting with the 10th document in the results list.
b <docstart>
Display results based on the last field selection.
i
Display information about K2 Server, including nodes and collections.
x <score precision>
Set score precision to 8- or 16-bit. By default, 16-bit precision is used.
h or ?
Display online Help for the rck2 command options.

Comments