NAME

kasyk - perform a query on a local or remote Kasyk index


USAGE

kasyk [options] indexdir | [host:]port [query]


DESCRIPTION

The 'kasyk' executable provides a raw interface to the searching of a local Kasyk index or a remotely running 'kasykd' or 'kasykcqd' server. The Kasyk query XML is either specified as a local file or streamed on standard input (STDIN). The Kasyk hitlist XML is sent to standard output (STDOUT), regardless of whether a local or a remote Kasyk index was queried.

From a performance point of view it is not advisable to use the 'kasyk' executable directly. It is better to use the Kasyk server (kasykd) or the Kasyk caching query server (kasykcqd) instead. The Kasyk searcher (kasyk) executable is provided nonetheless for two reasons. First, it is used by Kasyk caching query server (kasykcqd) for "ad hoc" Kasyk servers. And secondly, it can be used from the command line for debugging and testing of Kasyk query XML and Kasyk hitlist XML.


PARAMETERS

The first parameter is not optional. It either specifies the name of a local Kasyk index directory to be searched, or it indicates a remote host:port or a local port specification of a Kasyk server that should process the query.

indexdir
If the specified name exists as a directory, then it is assumed that it is the index directory to perform the query on. Such a directory (with the appropriate files) can be created with Kasyk initializer (kasyknew) using the appropriate Kasyk configuration XML and is commonly referred to as the "index directory". It should have been filled prior to searching with Kasyk indexer (kasykindex) using documents in the Kasyk document sequence XML format.
host:port
If the specified name contains a colon (:), then it is assumed to be the hostname (or IP-number) and port number of a Kasyk server (kasykd) or Kasyk caching query server (kasykcqd) that is listening on that host.
port
If the specified name does not exist as a directory, and does not contain a colon (:), and the name is completely numeric, then it is assumed to be the port number of a Kasyk server (kasykd) or Kasyk caching query server (kasykcqd) that is listening on localhost (127.0.0.1).

The second parameter is optional. It specifies the filename that contains the Kasyk query XML of one or more queries. If it is not specified, one (or more) queries are read from standard input (STDIN).

query
The name of the file containing one or more queries in Kasyk query XML.

The result of the query, which consists of Kasyk hitlist XML, is sent to standard output (STDOUT).


OPTIONS

--messagelog filename or -M filename
Set filename to be used for logging events. Overrides the name of the logfile that is specified in the Kasyk configuration XML or with the KASYK_MESSAGELOG environment variable.
--querylog filename or -Q filename
Set filename for logging queries. Overrides the name of any query logfile that is specified in the Kasyk configuration XML.
--user user or -u user
User id with which to execute . This is only applicable when running as root on Unix(like) systems. It should match whatever user setting (if any) was used with Kasyk initializer (kasyknew) and Kasyk indexer (kasykindex).
--group group or -g group
Group id with which to execute . This is only applicable when running as root on Unix(like) systems. It should match whatever group setting (if any) was used with Kasyk initializer (kasyknew) and Kasyk indexer (kasykindex).
--version or -V
Print version information of . This includes the software version, the index version it is compatible with, and whether or not it is a threaded version.
--verbose [level] or -v [level]
Set verbosity level of . Verbosity level of 1 is assumed if no value is specified. Can be used in conjunction with --copyright and --help.
--copyright or -C
Print copyright information of . This basically gives the standard GPL copyright statement. Use --verbose or -v also to get the complete copyright information including references to all internal and external libraries used.
--help or -h or -?
Print valid usage options of . Basically this information in a more condensed format.

EXAMPLES

Queries should always conform to Kasyk query XML. The resulting hitlist will always conform to Kasyk hitlist XML. Any Kasyk index must have been created with Kasyk initializer (kasyknew) previously and must have had documents indexed into it with Kasyk indexer (kasykindex).

querying a local index
 $ kasyk localindex searchit >result <ENTER>
 $

Query the Kasyk index "localindex" with the query that is stored in the file "searchit" and store the hitlist in file "result".

querying a local index interactively
 $ kasyk localindex >result <ENTER>
 <kasyk:query>what I want to find</kasyk:query> <ENTER>
 $

Query the Kasyk index "localindex" and store the resulting hitlist in file "result". Obtain the query interactively from the user.

querying a remote index
 $ kasyk myserver.domain.com:3333 searchfor <ENTER>
 <kasyk:hitlist xmlns:kasyk="http://www.kasyk.org/1.0">
 <header ..... >....</header>
 <hit ordinal="1">....</hit>
 :
 <hit ordinal="1000">....</hit>
 </kasyk:hitlist>
 $

Query the remote Kasyk index running as a server on the host named "myserver.domain.com" that is listening on port "3333" with the query stored in file "searchfor". Output the resulting hitlist on standard output (STDOUT).


SEE ALSO

Kasyk home, Kasyk configuration XML, Kasyk query XML, Kasyk hitlist XML, Kasyk initializer (kasyknew), Kasyk indexer (kasykindex), Kasyk server (kasykd), Kasyk caching query server (kasykcqd).

See http://www.kasyk.nl/program/kasyk.html for the most up-to-date version of this information.


KNOWN BUGS

See http://www.kasyk.nl/bugs/kasyk.html for the most up-to-date information about known bugs for 'kasyk'.


DIAGNOSTICS

Exit status is normally 0. Exit status 1 indicates a problem of some sort with an error message sent to STDERR and any active logfile.


COPYRIGHT

Copyright © 2003 Dijkmat BV

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Kasyk Program Information: Kasyk version 1.0.0, generated on Tue Nov 25 12:09:47 2003.