Using rcvdk


rcvdk is a command-line command-line tool for searching Verity collections and displaying documents. The rcvdk name is an acronym for Retrieval Client Verity Developer Kit.

NOTE: There is a software limitation in rcvdk when an invalid docID is encountered as the first docID . When the first docID is invalid, the VDKDocSetRead call fails since it uses the first docID to get the vdb schema. The gateway uses VDKDocSetRead to retrieve Access Control List (ACL) information for a file. Access information for a file or directory is stored in an ACL by the operating system. If the first docID is invalid, then the gateway returns "no access" to all documents in a collection.

Using rcvdk, you can check the contents of a collection from the command line. rcvdk allows you to write a variety of queries, using words and phrases separated by commas and/or Verity query language. A viewing option allows you to see document contents and highlights in a simple text display.

rcvdk can be found in the Verity bin directory. In a typical installation, the path is:

/verity/prdname/k2/_platform/bin/rcvdk

where verity/prdname represents the user-definable portion of the Verity installation directory name, and _platform represents the platform name (like _nti40 for Windows NT v4.0).

Starting rcvdk

To start rcvdk on most systems, type the path and executable name. On a Windows machine, use the Run dialog. The examples shown below assume you have set your PATH variable set, so you just need to enter "rcvdk" to run it.

When you start rcvdk with no arguments, you get the message below followed by a RC> prompt.


Type 'help' for a list of commands.
RC>
The "help" command produces the following list of available commands:


RC> help
Available commands:
search s Search documents.
results r Display search results.
clusters c Display clustered search results.
view v View document.
summarize z Summarize documents.
attach a Attach to one or more collections.
detach d Detach from one or more collections.
quit q Leave application.
about Display VDK `About' info.
help ? Display help text; `help help' for details.
expert x Toggle expert mode on/off.
user u Set user.
RC>
At any time, you can enter "q" at the RC> prompt to quit the application.

Attaching to a Collection

To search a collection, you first must attach to it using the "a" command. This command must include the path name to a collection directory as an argument. After you press return, rcvdk reports whether the attach command was successful.


RC>a /z/doc1/c/public/collref/html
Attaching to collection: /z/doc1/c/public/collref/html
Successfully attached to 1 collection.
RC>
rcvdk allows you to attach to one or more collections. The specified collections remain attached until you detach from one or more collections using the "d" command.

Attaching to Subsequent Collections

NOTE: rcvdk allows you to attach to more than one collection, although you can be attached to only one collection at a time.

Now that you are attached to the collection, mycoll1, do the following to attach to collection mycoll2.

1. Detach from mycoll1 by using the "d" command.


RC>d /z/colls/mycoll1
Detaching from collection: /z/colls/mycoll1
Successfully detached from 1 collection.
RC>
2. Attach to the collection mycoll2 by using the "a" command.


RC>a /z/colls/mycoll2
Attaching to collection: /z/colls/mycoll2
Successfully attached to 1 collection.
RC>

Basic Searching

To retrieve all documents, just enter "s" for search. After you press return, a search update message is produced, like the one shown below.


RC>s
Search update: finished (100%). Retrieved: 85(85)/85.
RC>
In the message returned for the NULL search, the notation indicates that 85 of the total 85 documents in the collection were retrieved. If you specify a query, like "universal filter", a subset of the total documents in the collection will be retrieved.


RC>s universal filter
Search update: finished (100%). Retrieved: 18(18)/85.
RC>
In the messsage returned for the search above, rcvdk indicates that 18 documents matched the query.

More elaborate queries using Verity query language can be used, like this:


RC>s universal filter <OR> filter

Viewing Results

After you have attached to a collection and issued a search command successfully, you can view the results list and look at the retrieved documents. The options below can be used.

Option
Description
r
Displays the results list, starting with the first document. A maximum of 24 documents will be displayed.
r N
Displays the results list, starting with the Nth document. A maximum of 24 documents will be displayed.
v
Displays the first or next document in the results list. Highlights, or matched query terms, are indicated using reverse video, if possible. If not, double angle brackets are used. For example, if you searched for the term "universal filter," you would see the following in the document display:
>>universal<< >>filter<<
To exit the document display, enter "q".

v N
Displays the Nth document in the results list. To exit the document display, enter "q".
The results list for the search, RC>s universal filter, is shown below. For each document, these fields are displayed by default: Number, Score, and VdkVgwKey.


RC> r
Retrieved: 15(15)/85
Number SCORE VdkVgwKey
1: 1.00 d:\verity\k2\docs\doc\fundmntl\08_k23.htm
2: 0.97 d:\verity\k2\docs\doc\fundmntl\11_k22.htm
3: 0.97 d:\verity\k2\docs\doc\fundmntl\08_k27.htm
4: 0.97 d:\verity\k2\docs\doc\fundmntl\08_k21.htm
5: 0.95 d:\verity\k2\docs\doc\fundmntl\k2toc.htm
6: 0.95 d:\verity\k2\docs\doc\fundmntl\08_k24.htm
7: 0.93 d:\verity\k2\docs\doc\fundmntl\k2ix.htm
8: 0.92 d:\verity\k2\docs\doc\fundmntl\08_k26.htm
9: 0.90 d:\verity\k2\docs\doc\fundmntl\08_k2.htm
10: 0.90 d:\verity\k2\docs\doc\fundmntl\04_k21.htm
11: 0.90 d:\verity\k2\docs\doc\fundmntl\01_k21.htm
12: 0.87 d:\verity\k2\docs\doc\fundmntl\f_k2.htm
13: 0.87 d:\verity\k2\docs\doc\fundmntl\08_k22.htm
14: 0.84 d:\verity\k2\docs\doc\fundmntl\06_k21.htm
15: 0.80 d:\verity\k2\docs\doc\fundmntl\part4.htm
RC>
A description of each of the default fields is given below.

Field Name
Description
Number
The rank of the document in the results list. The document with the highest score is ranked number 1.
Score
The score assigned to each retrieved document, based on its relevance to the query. For a NULL query, no scores are assigned, so the Score column in the results list is blank.
VdkVgwKey
The document key used by the Verity engine to refer to the document.

Authenticating with rcvdk

For secure collections, you cannot view documents without supplying the appropriate user credentials. The "u" command allows you to set user credentials for an rcvdk session.

The credentials you supply must match the credentials in the repository where documents are stored.

Displaying More Fields

You can tell rcvdk to display certain fields in the results list using the "fields" command, which is available in the expert mode. To go to the expert mode, enter "x" or "expert" at the RC> prompt, then press Enter.

The "fields" command includes the field name and length to be displayed. When used, the "fields" command overrides the default fields for the results list, Score and VdkVgwKey.

Fields for the results list are returned by the search engine, so if you have done a search, then go to expert mode to use the "fields" command, you must run the search again in order to see the results list with the fields you requested.

All fields in a column will be blank if the field is not defined for the collection's schema in the documents table (in style.ddd, style.sfl, or style.ufl). A field in a document's row will be blank if the field was not populated by a gateway, bulk submit action, or filter.


RC> expert
Expert mode enabled
RC> fields title 40
RC> s universal filter
Search update: finished (100%). Retrieved: 15(15)/85.
RC> r
Retrieved: 15(15)/85
Number title
1: Verity Portal Fundamentals
2: Document Types
3: Indexing File Systems
4: Indexing Web Servers
5: Table of Contents
6: Indexing Exchange Servers
7: Index
8: Verifying Collections
9: Maintaining Collections
10: Tuning Unstructured Search
11: Field and Collection Schema Definition
12: Starting Servers from the Command Line
13: Using the K2 System Console
14: Parametric Search
15: Personalization Engine
RC>

How to Display Multiple Fields

Multiple fields can be specified with the "fields" command, as shown below. The field order corresponds to the order of the columns, with the first field specified appearing in the second column. The first column is reserved for the rank order.

Remember to re-run the search before you display the results list with the fields specified.


RC> fields score 5 title 40
RC> s universal filter
Search update: finished (100%). Retrieved: 15(15)/85.
RC>




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