README.TXT

Demonstration of issuing Microsoft Index Server queries 


SUMMARY
=======

QSAMPLE is a command line utility that issues Microsoft Index Server queries.
It uses the helper functions CCreateICommand and CITextToFullTree to
simplify the code needed to create a query.


MORE INFORMATION
================

usage: QSAMPLE query [/c:catalog] [/m:machine]
query a Microsoft Index Server query
/c:catalog name of the catalog, default is SYSTEM
/m:machine name of the machine, default is local machine
/d displays the DBCOMMANDTREE, default is off

The syntax for the "query" parameter is described in the Microsoft Index
Server documentation. Typically this is a single word. To include a
space in a query, enclose the query in quotes.

The "catalog" parameter is the name of the catalog to be queried. The
default is "SYSTEM", which is the default catalog installed with Windows
NT 5.0. Additional catalogs can be created with the Microsoft Index Server
MMC snapin.

The "machine" parameter is the name of the machine on which the query
will be executed. The default is ".", which is the local machine. Machine
names should not be preceeded with two backslashes.

The "/d" parameter displays the DBCOMMANDTREE built to execute the query.

For each file that matches the query, the file's size and path
are printed.

The query results are not sorted.

How this example differs from the ADVQUERY sample:

QSAMPLE uses Index Server's helper functions CICreateCommand and
CITextToFullTree as opposed to creating an ICommand via ole and
the command tree from scratch.

Examples:

qsample foo
Finds all files in the SYSTEM catalog on the local machine containing
the word "foo"

qsample "foo bar"
Finds all files in the SYSTEM catalog on the local machine containing
the phrase "foo bar"

qsample "foo and bar"
Finds all files in the SYSTEM catalog on the local machine containing
both "foo" and "bar"

qsample "foo or bar"
Finds all files in the SYSTEM catalog on the local machine containing
either "foo" or "bar"

qsample foo /m:SERVERNAME
Finds all files in the SYSTEM catalog on machine "servername" containing
the word foo

qsample "@size > 1000000"
Finds all files in the SYSTEM catalog on the local machine larger than
one million bytes.

qsample "@size > 1000000 and #filename *.gif" /c:WEB /m:SERVERNAME
Finds all files with the .gif extension larger than one million bytes
in the WEB catalog on machine SERVERNAME