One of the lesser know Verity utilities that ships with ColdFusion MX 7, as well as CFMX 6 and CF 5, is the search tool rcvdk. Unlike other utilities such as mkvdk and vspider, rcvdk must be run interactively so you can't script it. Its useful for times when you want to test searching a Verity collection by doing simple and advanced searches, and can be useful to see if the results match the equivalent search pattern in your code with CFSEARCH.
For additional detail, check out the ColdFusion MX 7 Documentation for rcvdk, and didump too.
Usage is a little tricky, and I'll walk you through how to use it from the commandline. In this case, I'm using Linux, but it behaves (almost) the same on Windows.
First note that the default locale is Englishx, for English Advanced, so when creating collections on the commandline with mkvdk or vspider, if you don't specify a locate then the collection is created as Englishx. When creating a collection from the ColdFusion Administrator, the default option is English Basic, which is the equivalent of just English. On the commandline, these options ar specified as either (lowercase) englishx or english.
Here's the contents of a test server having 3 collections already. - bookclub - a sample collection shipped with cfdocs
- macr_verity_test2 - a collection created from the CF Administrator (english)
- vspidertest3 - a collection created with vspider (englishx)
[root@ps-port bin]# ls -l /opt/coldfusionmx7/verity/collections/ total 12 drwxr-xr-x 12 nobody nobody 4096 Feb 4 16:46 bookclub -rwxrwxr-x 1 nobody root 0 Jun 5 2003 empty.txt drwxr-xr-x 11 nobody nobody 4096 Mar 28 19:54 macr_verity_test2 drwxr-xr-x 12 root root 4096 Mar 28 20:05 vspidertest3
Now on Unix and Linux, set LD_LIBRARY_PATH first. Note I just append '.' to the end of the existing LD_LIBRARY_PATH since I'm working from the directory containing rcvdk.
[root@ps-port bin]# pwd /opt/coldfusionmx7/verity/k2/_ilnx21/bin [root@ps-port bin]# ls -l rcvdk -rwxrwxr-x 1 nobody root 62929 May 24 2004 rcvdk [root@ps-port bin]# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. [root@ps-port bin]# export LD_LIBRARY_PATH
Run rcvdk, in this case without specifying a locale, so the default englishx is used when searching.
[root@ps-port bin]# ./rcvdk rcvdk Verity, Inc. Version 5.5.0 Attached collections [0]: Type 'help' for a list of commands.
Examine the utility's options
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. username[:password][:domain][:mailbox]
Examine the utility's expert options
RC> expert Expert mode enabled 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. source Set default source. sort Set default sort. disable Disable/enable collections. debug Toggle internal debug flag. fields Set fields to display. highlight Set highlight display. hlmode Toggle index-based/stream-based highlighting. markup Toggle markup display on/off. qparser Select/List QParsers. history Show query history. precision Set score precision. user u Set user. username[:password][:domain][:mailbox] time t Toggle display of search execution time. checkid Check document access with a list of VdkDocIDs. checkkey Check document access with single or a list of VdkDocKeys. pbs Configure passage-based summary.
Attach to a collection before searching it. In this case I'm attaching to the vspider collection that was created without specifying a locale. Therefore my rcvdk working locale matches the locale of the collection, englishx.
RC> attach /opt/coldfusionmx7/verity/collections/vspidertest3 Attaching to collection: /opt/coldfusionmx7/verity/collections/vspidertest3 Successfully attached to 1 collection.
Try a wildcard search and then look at the results
Detach or let go of the collection and quit
RC> detach Attached collections [1]: Enabled: /opt/coldfusionmx7/verity/collections/vspidertest3 RC> quit [root@ps-port bin]#
Now, run rcvdk without specifying a locale, but try attaching to a collection having a different locale
[root@ps-port bin]# ./rcvdk rcvdk Verity, Inc. Version 5.5.0 Attached collections [0]: Type 'help' for a list of commands. RC> attach /opt/coldfusionmx7/verity/collections/macr_verity_test2 Attaching to collection: /opt/coldfusionmx7/verity/collections/macr_verity_test2 >> Error E3-0036 (VDK): Collection's locale(english) not compatible with Session's locale(englishx) Error attaching to collection: /opt/coldfusionmx7/verity/collections/macr_verity_test2 RC> quit [root@ps-port bin]#
Start rcvdk again, but change the locale to english, or English Basic. This is appropriate for the collection created in the CF Admin with English Basic locale.
[root@ps-port bin]# ./rcvdk -locale english rcvdk Verity, Inc. Version 5.5.0 Attached collections [0]: Type 'help' for a list of commands.
Attach to the collection and test running a few word searches
RC> attach /opt/coldfusionmx7/verity/collections/macr_verity_test2 Attaching to collection: /opt/coldfusionmx7/verity/collections/macr_verity_test2 Successfully attached to 1 collection. RC> search bob Search update: finished (100%). Retrieved: 0(0)/9. RC> search Bill Search update: finished (100%). Retrieved: 0(0)/9. RC> search foo Search update: finished (100%). Retrieved: 5(5)/9. RC> search cfdocument Search update: finished (100%). Retrieved: 1(1)/9. RC> search bill Search update: finished (100%). Retrieved: 0(0)/9. RC> search Writer Search update: finished (100%). Retrieved: 0(0)/9. RC> search months Search update: finished (100%). Retrieved: 1(1)/9.
Search again, using a Boolean operator and then examine the results RC> search months AND document Search update: finished (100%). Retrieved: 1(1)/9. RC> results Retrieved: 1(1)/9 Number SCORE VdkVgwKey 1: 0.7967 /opt/coldfusionmx7/wwwroot/macr_verity_test/content/foo.pdf
Now try using the summarize action on the 1st result in the set (a set of just 1 in this case). I suppose if I changed the style.uni file I could get this to work.
RC> summarize 1 1: 0.7967 /opt/coldfusionmx7/wwwroot/macr_verity_test/content/foo.pdf >> Error E0-1514 (Drvr): TstrIOFilter:flt_lang: (-19987) Couldn't find KV filters >> Error E0-0720 (I/O Filter): Could not load filter 'flt_lang ' which is named in your style.uni file. RC> summarize 1: 0.7967 /opt/coldfusionmx7/wwwroot/macr_verity_test/content/foo.pdf >> Error E0-1514 (Drvr): TstrIOFilter:flt_lang: (-19987) Couldn't find KV filters >> Error E0-0720 (I/O Filter): Could not load filter 'flt_lang ' which is named in your style.uni file.
Now detach from the collection and quit.
RC> detach Attached collections [1]: Enabled: /opt/coldfusionmx7/verity/collections/macr_verity_test2 RC> quit [root@ps-port bin]#
|